Пример #1
0
 def _getinbound_port( self ):
     # Do an extrusion scan and return the inbound open ports
     es = extrusionScanner( self._exec_method )
     try:
         inbound_port = es.getInboundPort()
     except Exception, e:
         
         om.out.error( 'The extrusion scan failed.' )
         om.out.error( 'Error: ' + str(e) )
         
         for p in [ 8080, 5060, 3306, 1434, 1433, 443, 80, 25, 22]:
             if self._is_locally_available(p) and es.isAvailable( p, 'TCP' ):
                 om.out.console('Using inbound port "'+ str(p) +'" without knowing if the remote host will be able to connect back.')
                 return p
         
         raise e
Пример #2
0
 def __init__( self, exec_method ):
     self._exec_method = exec_method
     self._es = extrusionScanner( exec_method )