예제 #1
0
파일: pentest.py 프로젝트: kn9/AtEar
 def __init__(self, iface, timeout=300, ftp_login=False, ssh_login=False, telnet_login=False, smtp_login=False,
              pop_login=False, imap_login=False, ldap_login=False, smb_login=False, rlogin_login=False,
              mssql_login=False, mysql_login=False, pgsql_login=False, vnc_login=False, snmp_login=False):
     self.iface = iface
     self.timeout = timeout
     self.ftp_login = ftp_login
     self.ssh_login = ssh_login
     self.telnet_login = telnet_login
     self.smtp_login = smtp_login
     self.pop_login = pop_login
     self.imap_login = imap_login
     self.ldap_login = ldap_login
     self.smb_login = smb_login
     self.rlogin_login = rlogin_login
     self.mssql_login = mssql_login
     self.mysql_login = mysql_login
     self.pgsql_login = pgsql_login
     self.vnc_login = vnc_login
     self.snmp_login = snmp_login
     self.network_host_list = network.network_host_ip('eth0')
     self.my_ip = network.get_ip_address('eht0')
     self.user = []
     self.password = []
     self.idx = len(self.user)
     self.return_result = "["
예제 #2
0
    def run(self):
        time = int(self.time) / int(len(self.object['aplist']))
        self.create_brtue_text()
        for i in xrange(0, len(self.object['aplist'])):
            channel = self.object['aplist'][i]['channel']
            bssid = self.object['aplist'][i]['bssid']
            essid = self.object['aplist'][i]['essid']
            enc_type = self.object['aplist'][i]['enc_type']
            ap_crack = Attack(self.iface, channel, bssid, essid, enc_type, timeout=time)
            public_ip = False
            conn_host = False
            ap_crack.run()
            ap_values = ap_crack.get_value()
            if ap_values['key']:
                if network.set_new_connection(essid, ap_values['key'], self.iface):
                    if self.public_ip_get:
                        public_ip = network.myip()
                    if self.conn_host_info:
                        try:
                            conn_host = network.network_host_ip(self.iface)
                        except IOError:
                            conn_host = False

            self.result_value += str({'essid': ap_values['essid'], 'bssid': ap_values['bssid'], 'inject_T': ap_values['inject_T'],
                                  'fake_auth_T': ap_values['fake_auth_T'], 'arp_req_T': ap_values['arp_req_T'], 'key': ap_values['key'],
                                  'public_ip': public_ip, 'conn_host_info': conn_host}) + ", "
            ap_crack.stop()

        self.result_value = str(self.result_value[:-2]) + ']'
예제 #3
0
    def run(self):
        time = int(self.time) / int(len(self.object['aplist']))
        self.create_brtue_text()
        for i in xrange(0, len(self.object['aplist'])):
            channel = self.object['aplist'][i]['channel']
            bssid = self.object['aplist'][i]['bssid']
            essid = self.object['aplist'][i]['essid']
            enc_type = self.object['aplist'][i]['enc_type']
            ap_crack = Attack(self.iface,
                              channel,
                              bssid,
                              essid,
                              enc_type,
                              timeout=time)
            public_ip = False
            conn_host = False
            ap_crack.run()
            ap_values = ap_crack.get_value()
            if ap_values['key']:
                if network.set_new_connection(essid, ap_values['key'],
                                              self.iface):
                    if self.public_ip_get:
                        public_ip = network.myip()
                    if self.conn_host_info:
                        try:
                            conn_host = network.network_host_ip(self.iface)
                        except IOError:
                            conn_host = False

            self.result_value += str({
                'essid': ap_values['essid'],
                'bssid': ap_values['bssid'],
                'inject_T': ap_values['inject_T'],
                'fake_auth_T': ap_values['fake_auth_T'],
                'arp_req_T': ap_values['arp_req_T'],
                'key': ap_values['key'],
                'public_ip': public_ip,
                'conn_host_info': conn_host
            }) + ", "
            ap_crack.stop()

        self.result_value = str(self.result_value[:-2]) + ']'
예제 #4
0
 def __init__(self,
              iface,
              timeout=300,
              ftp_login=False,
              ssh_login=False,
              telnet_login=False,
              smtp_login=False,
              pop_login=False,
              imap_login=False,
              ldap_login=False,
              smb_login=False,
              rlogin_login=False,
              mssql_login=False,
              mysql_login=False,
              pgsql_login=False,
              vnc_login=False,
              snmp_login=False):
     self.iface = iface
     self.timeout = timeout
     self.ftp_login = ftp_login
     self.ssh_login = ssh_login
     self.telnet_login = telnet_login
     self.smtp_login = smtp_login
     self.pop_login = pop_login
     self.imap_login = imap_login
     self.ldap_login = ldap_login
     self.smb_login = smb_login
     self.rlogin_login = rlogin_login
     self.mssql_login = mssql_login
     self.mysql_login = mysql_login
     self.pgsql_login = pgsql_login
     self.vnc_login = vnc_login
     self.snmp_login = snmp_login
     self.network_host_list = network.network_host_ip('eth0')
     self.my_ip = network.get_ip_address('eht0')
     self.user = []
     self.password = []
     self.idx = len(self.user)
     self.return_result = "["