def generate_dummy_messages(self, num): dummy_messages = [ ('DUMMY', generate_random_string(self.config_params.NOISE_LENGTH), generate_random_string(self.config_params.NOISE_LENGTH)) for _ in range(num) ] return dummy_messages
def create_loop_message(self, path): path = path + [self] loop_message = 'HT' + generate_random_string(self.config.NOISE_LENGTH) header, body = self.packer.make_sphinx_packet(receiver=self, path=path, message=loop_message) return header, body
def create_dummy_message(self, receiver): path = [receiver] dummy_message = 'HD' + generate_random_string(self.config.NOISE_LENGTH) header, body = self.packer.make_sphinx_packet(receiver=receiver, path=path, message=dummy_message) return header, body
def create_loop_message(self, path): loop_message = 'HT' + generate_random_string(self.config.NOISE_LENGTH) header, body = self.packer.make_sphinx_packet(self, path, loop_message, type_flag=b'\x03') log.msg("[%s] > Packed loop message." % self.name) return (header, body)
def create_drop_message(self, random_reciever, path): drop_message = generate_random_string(self.config.NOISE_LENGTH) header, body = self.packer.make_sphinx_packet(random_reciever, path, drop_message, drop_flag=True) log.msg("[%s] > Packed drop message." % self.name) return (header, body)
ipaddr = line.rstrip() webserver = ipaddr # grab port options from payloadgen.py if os.path.isfile("src/program_junk/port.options"): fileopen = file("src/program_junk/port.options", "r") for line in fileopen: port = line.rstrip() else: port = raw_input("Enter the port you want to use for the connection back: ") # define the main variables here # generate a random executable name per instance exe_name = core.generate_random_string(10, 10) + ".exe" webserver = webserver + " " + port webserver = exe_name + " " + webserver # this is generated through payloadgen.py and lets SET know if its a RATTE payload or SET payload if os.path.isfile("src/program_junk/set.payload"): fileopen = file("src/program_junk/set.payload", "r") for line in fileopen: payload_selection = line.rstrip() else: payload_selection = "SETSHELL" # determine if we want to target osx/nix as well