예제 #1
0
    def test_login(self):
        """ Tests if HTTPs bee can login to the http capability.
        """
        sessions = {}
        users = {'test': BaitUser('test', 'test')}
        authenticator = Authenticator(users)
        Session.authenticator = authenticator
        options = {'enabled': 'True', 'port': 0}
        cap = hive_https.https(sessions, options, users, self.work_dir)
        srv = StreamServer(('0.0.0.0', 0), cap.handle_session)
        srv.start()

        bee_info = {
            'timing': 'regular',
            'username': '******',
            'password': '******',
            'port': srv.server_port,
            'server': '127.0.0.1'
        }
        beesessions = {}
        BaitSession.client_id = 'f51171df-c8f6-4af4-86c0-f4e163cf69e8'

        current_bee = bee_https.https(beesessions, bee_info)
        current_bee.do_session('127.0.0.1')
        srv.stop()
예제 #2
0
    def test_login(self):
        """ Tests if HTTPs bait can login to the http capability.
        """
        sessions = {}
        options = {'enabled': 'True', 'port': 0, 'users': {'test': 'test'}}
        cap = hive_https.https(sessions, options, self.work_dir)
        srv = StreamServer(('0.0.0.0', 0), cap.handle_session)
        srv.start()

        bee_info = {
            'timing': 'regular',
            'username': '******',
            'password': '******',
            'port': srv.server_port,
            'server': '127.0.0.1',
            'honeypot_id': '1234'
        }
        beesessions = {}
        BaitSession.client_id = 'f51171df-c8f6-4af4-86c0-f4e163cf69e8'

        current_bait = bee_https.https(beesessions, bee_info)
        current_bait.start()
        srv.stop()