本文整理汇总了Python中beeswarm.drones.honeypot.honeypot.Honeypot.prepare_environment方法的典型用法代码示例。如果您正苦于以下问题:Python Honeypot.prepare_environment方法的具体用法?Python Honeypot.prepare_environment怎么用?Python Honeypot.prepare_environment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类beeswarm.drones.honeypot.honeypot.Honeypot
的用法示例。
在下文中一共展示了Honeypot.prepare_environment方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from beeswarm.drones.honeypot.honeypot import Honeypot [as 别名]
# 或者: from beeswarm.drones.honeypot.honeypot.Honeypot import prepare_environment [as 别名]
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
# 需要导入模块: from beeswarm.drones.honeypot.honeypot import Honeypot [as 别名]
# 或者: from beeswarm.drones.honeypot.honeypot.Honeypot import prepare_environment [as 别名]
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
# 需要导入模块: from beeswarm.drones.honeypot.honeypot import Honeypot [as 别名]
# 或者: from beeswarm.drones.honeypot.honeypot.Honeypot import prepare_environment [as 别名]
def setUp(self):
self.work_dir = tempfile.mkdtemp()
Honeypot.prepare_environment(self.work_dir)
示例4: setUp
# 需要导入模块: from beeswarm.drones.honeypot.honeypot import Honeypot [as 别名]
# 或者: from beeswarm.drones.honeypot.honeypot.Honeypot import prepare_environment [as 别名]
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: setUp
# 需要导入模块: from beeswarm.drones.honeypot.honeypot import Honeypot [as 别名]
# 或者: from beeswarm.drones.honeypot.honeypot.Honeypot import prepare_environment [as 别名]
def setUp(self):
self.work_dir = tempfile.mkdtemp()
Honeypot.prepare_environment(self.work_dir)
self.create_file_system()