def __init__( self, stream, handler, queue_dict, base_shell, ignore_messages = set(['X']), prompt_templ = "=|{stream}]> ~ ") : # print( ShellcodeSubShell ) SimpleSubShell.__init__( self, stream, handler, queue_dict, base_shell, ignore_messages, prompt_templ ) self.shellcode_buffer = '' self.download = None self.uplaod = None self.message_function = _response_manager
def __init__(self, stream, handler, queue_dict, base_shell, ignore_messages=set(['X']), prompt_templ=" (-){stream}(+)> "): SimpleSubShell.__init__(self, stream, handler, queue_dict, base_shell, ignore_messages, prompt_templ) self.updatePrompt()
def __init__(self, stream, handler, queue_dict, base_shell, ignore_messages=set(['X']), prompt_templ="[{stream}]> "): # print( ShellcodeSubShell ) SimpleSubShell.__init__(self, stream, handler, queue_dict, base_shell, ignore_messages, prompt_templ) self.shellcode_buffer = ''
def __init__(self, stream, handler, queue_dict, base_shell, ignore_messages=set(['X']), prompt_templ=" (>{stream}<) |-> "): SimpleSubShell.__init__(self, stream, handler, queue_dict, base_shell, ignore_messages, prompt_templ) self.updatePrompt() self.message_function = message_handle self.sysinfo = False
def __init__(self, stream, handler, queue_dict, base_shell, ignore_messages=set(['X']), prompt_templ=" ExampleSubShell Stream:[{stream}]==> "): SimpleSubShell.__init__(self, stream, handler, queue_dict, base_shell, ignore_messages, prompt_templ) """A method that uses the `prompt_templ` argument to reformat the prompt (in case the `format()` {tags} have changed)""" self.updatePrompt()
def __init__(self, stream, handler, queue_dict, base_shell, ignore_messages=set(), prompt_templ="{stream} < "): SimpleSubShell.__init__(self, stream, handler, queue_dict, base_shell, ignore_messages, prompt_templ) """A method that uses the `prompt_templ` argument to reformat the prompt (in case the `format()` {tags} have changed)""" self.updatePrompt() def meterpreter_send(message, instance): if message in ignore_messages: return print("[+] Received from Agent {") print("[!] '%s'" % message.encode('hex')) send_len = instance.proxy.send(message) instance.stats['incoming'] += len(message) print("[+] Message Delivered to Handler! (%d bytes)}" % send_len) print("Creating Proxy socket") self.proxy = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.proxy.connect(("127.0.0.1", 4444)) # Metasploits Handler print("Connected to meterpreter handler socket!") self.stats = { 'incoming': 0, 'outgoing': 0, 'handler': None, } self.message_function = meterpreter_send sleep(0.1) self.proxy_thread = threading.Thread(target=meterpreter_proxy, args=(self.proxy, self)) self.proxy_thread.daemon = True self.proxy_thread.start() self.pinger_thread = threading.Thread(target=self.ping_meterpreter) self.pinger_thread.daemon = True self.pinger_thread.start()
def __init__(self, stream, handler, queue_dict, base_shell, ignore_messages=set(['X']), prompt_templ="[{stream}] {intent_str} "): # print ShellcodeSubShell SimpleSubShell.__init__(self, stream, handler, queue_dict, base_shell, ignore_messages, prompt_templ) self.indentation = False self.python_buffer = '' self.file_buffer = '' # self.use_rawinput = False self.updatePrompt() self.special_commands = { 'storage': self.showStorage, 'pyload': self.loadFile, 'show': self.showBuffer, 'clear': self.clearBuffer, 'send': self.sendFileBuffer, 'append': self.appendFileBuffer, }