aws_scanner.py
def scan_instance(instance):            
    """ 
    Port scan instance and report ports
  
    This function will portscan the specified instance given the parameters
    on the command line.  See the PortScanner class in scanner.py for more info
  
    Parameters: 
    instance (obj): instance object returned by boto3
  
    Returns: 
    int: Description of return value region resource
  
    """
    scanner = PortScanner()
    scanner.target = instance.public_ip_address
    scanner.start_port = args.start_port[0]
    scanner.end_port = args.end_port[0]
    scanner.threads = args.jobs[0]
    scanner.timeout = args.timeout[0]
    ports = scanner.scan()

    if len(ports) > 0:
        for port in ports:
            print("\t\t\tPort: "+str(port['Port'])+"\t"+"Service: "+port['Service'])
    else:
        print("\t\t\tNo open ports detected")
 
    Port scan instance and report ports
  
    This function will portscan the specified instance given the parameters
    on the command line.  See the PortScanner class in scanner.py for more info
  
    Parameters: 
    instance (obj): instance object returned by boto3
  
    Returns: 
    int: Description of return value region resource
  
    
Port scan instance and report ports
This function will portscan the specified instance given the parameters
on the command line.  See the PortScanner class in scanner.py for more info

instance (obj): instance object returned by boto3

Description of return value region resource
Port scan instance and report ports This function will portscan the specified instance given the parameters on the command line . See the PortScanner class in scanner . py for more info instance ( obj ) : instance object returned by boto3 Description of return value region resource
def scan_instance(instance):            
    scanner = PortScanner()
    scanner.target = instance.public_ip_address
    scanner.start_port = args.start_port[0]
    scanner.end_port = args.end_port[0]
    scanner.threads = args.jobs[0]
    scanner.timeout = args.timeout[0]
    ports = scanner.scan()
    if len(ports) > 0:
        for port in ports:
            print("\t\t\tPort: "+str(port['Port'])+"\t"+"Service: "+port['Service'])
    else:
        print("\t\t\tNo open ports detected")
def scan_instance ( instance ) : scanner = PortScanner ( ) scanner . target = instance . public_ip_address scanner . start_port = args . start_port [ 0 ] scanner . end_port = args . end_port [ 0 ] scanner . threads = args . jobs [ 0 ] scanner . timeout = args . timeout [ 0 ] ports = scanner . scan ( ) if len ( ports ) > 0 : for port in ports : print ( "\t\t\tPort: " + str ( port [ 'Port' ] ) + "\t" + "Service: " + port [ 'Service' ] ) else : print ( "\t\t\tNo open ports detected" )
Port scan instance and report ports
This function will portscan the specified instance given the parameters
on the command line.
Port scan instance and report ports This function will portscan the specified instance given the parameters on the command line .
""" 
    Port scan instance and report ports
  
    This function will portscan the specified instance given the parameters
    on the command line.  See the PortScanner class in scanner.py for more info
  
    Parameters: 
    instance (obj): instance object returned by boto3
  
    Returns: 
    int: Description of return value region resource
  
    """
instance