def __init__(self, malware_name): self.cnc_ip = "127.0.0.1" self.cnc_port = "5000" self.malware_exe_path = self.STORAGE_PATH + f"\\{malware_name}.exe" self.malware_csv_path = self.STORAGE_PATH + f"\\{malware_name}.csv" self.malware_json_path = self.STORAGE_PATH + f"\\{malware_name}.json" # Run cnc cnc_thread = cnc_main.cnc() cnc_thread.setDaemon(True) cnc_thread.start() with mock.patch('agent.agent_main.input', side_effect=["127.0.0.1", 5000]): from agent import agent_main # run agent stub agent, self.agent_id, agent_ip, agent_port = agent_main.agent() agent.setDaemon(True) agent.start() values = {'malware_name': f'malware_name_Acceptance', 'malware_description': malware_name } test_status = False self.values = values
def setUp(self): self.cnc_ip = "127.0.0.1" self.cnc_port = "5000" # Run cnc cnc_thread = cnc_main.cnc() cnc_thread.setDaemon(True) cnc_thread.start()
def setUp(self): self.cnc_ip = "127.0.0.1" self.cnc_port = "5000" # Run cnc cnc_thread = cnc_main.cnc() cnc_thread.setDaemon(True) cnc_thread.start() with mock.patch('agent.agent_main.input', side_effect=["127.0.0.1", 5000]): # run agent stub agent, agent_id, agent_ip, agent_port = agent_main.agent() agent.setDaemon(True) agent.start()
def setUp(self): # self.sr = SystemRunner('Ardamax') self.cnc_ip = "127.0.0.1" self.cnc_port = "5000" try: shutil.rmtree('build') os.remove('in.spec') os.remove('pre.spec') os.remove('post.spec') except: pass # Run cnc cnc_thread = cnc_main.cnc() cnc_thread.setDaemon(True) cnc_thread.start() with mock.patch('agent.agent_main.input', side_effect=["127.0.0.1", 5000]): # run agent stub agent, self.agent_id, agent_ip, agent_port = agent_main.agent() agent.setDaemon(True) agent.start()