本文整理汇总了Python中beeswarm.drones.honeypot.honeypot.Honeypot类的典型用法代码示例。如果您正苦于以下问题:Python Honeypot类的具体用法?Python Honeypot怎么用?Python Honeypot使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Honeypot类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
def setUp(self):
self.work_dir = tempfile.mkdtemp()
Honeypot.prepare_environment(self.work_dir)
test_config_file = os.path.join(os.path.dirname(__file__), 'honeypotcfg.json.test')
with open(test_config_file, 'r') as config_file:
self.config_dict = json.load(config_file, object_hook=asciify)
self.key = os.path.join(os.path.dirname(__file__), 'dummy_key.key')
self.cert = os.path.join(os.path.dirname(__file__), 'dummy_cert.crt')
self.inbox = gevent.queue.Queue()
self.mock_relay = gevent.spawn(self.mock_server_relay)
示例2: setUp
def setUp(self):
beeswarm.shared.zmq_context = zmq.Context()
self.work_dir = tempfile.mkdtemp()
Honeypot.prepare_environment(self.work_dir)
test_config_file = os.path.join(os.path.dirname(__file__), "honeypotcfg.json.test")
with open(test_config_file, "r") as config_file:
self.config_dict = json.load(config_file, object_hook=asciify)
self.key = os.path.join(os.path.dirname(__file__), "dummy_key.key")
self.cert = os.path.join(os.path.dirname(__file__), "dummy_cert.crt")
self.inbox = gevent.queue.Queue()
self.mock_relay = gevent.spawn(self.mock_server_relay)
示例3: setUp
def setUp(self):
self.work_dir = tempfile.mkdtemp()
Honeypot.prepare_environment(self.work_dir)
示例4: setUp
def setUp(self):
self.work_dir = tempfile.mkdtemp()
Honeypot.prepare_environment(self.work_dir)
self.key = os.path.join(os.path.dirname(__file__), 'dummy_key.key')
self.cert = os.path.join(os.path.dirname(__file__), 'dummy_cert.crt')
示例5: test_user_creation
def test_user_creation(self):
"""Tests proper generation of BaitUsers from the data in the config file"""
sut = Honeypot(self.work_dir, self.config_dict, key=self.key, cert=self.cert)
sut.create_users()
self.assertEquals(1, len(sut.users))
示例6: setUp
def setUp(self):
self.work_dir = tempfile.mkdtemp()
Honeypot.prepare_environment(self.work_dir)
self.create_file_system()