(self)
| 60 | """ |
| 61 | |
| 62 | def _initVars(self): |
| 63 | self.connectionStr = None |
| 64 | self.lhostStr = None |
| 65 | self.rhostStr = None |
| 66 | self.portStr = None |
| 67 | self.payloadStr = None |
| 68 | self.encoderStr = None |
| 69 | self.payloadConnStr = None |
| 70 | self.localIP = getLocalIP() |
| 71 | self.remoteIP = getRemoteIP() or conf.hostname |
| 72 | self._msfCli = normalizePath(os.path.join(conf.msfPath, "msfcli%s" % (".bat" if IS_WIN else ""))) |
| 73 | self._msfConsole = normalizePath(os.path.join(conf.msfPath, "msfconsole%s" % (".bat" if IS_WIN else ""))) |
| 74 | self._msfEncode = normalizePath(os.path.join(conf.msfPath, "msfencode%s" % (".bat" if IS_WIN else ""))) |
| 75 | self._msfPayload = normalizePath(os.path.join(conf.msfPath, "msfpayload%s" % (".bat" if IS_WIN else ""))) |
| 76 | self._msfVenom = normalizePath(os.path.join(conf.msfPath, "msfvenom%s" % (".bat" if IS_WIN else ""))) |
| 77 | |
| 78 | self._msfPayloadsList = { |
| 79 | "windows": { |
| 80 | 1: ("Meterpreter (default)", "windows/meterpreter"), |
| 81 | 2: ("Shell", "windows/shell"), |
| 82 | 3: ("VNC", "windows/vncinject"), |
| 83 | }, |
| 84 | "linux": { |
| 85 | 1: ("Shell (default)", "linux/x86/shell"), |
| 86 | 2: ("Meterpreter (beta)", "linux/x86/meterpreter"), |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | self._msfConnectionsList = { |
| 91 | "windows": { |
| 92 | 1: ("Reverse TCP: Connect back from the database host to this machine (default)", "reverse_tcp"), |
| 93 | 2: ("Reverse TCP: Try to connect back from the database host to this machine, on all ports between the specified and 65535", "reverse_tcp_allports"), |
| 94 | 3: ("Reverse HTTP: Connect back from the database host to this machine tunnelling traffic over HTTP", "reverse_http"), |
| 95 | 4: ("Reverse HTTPS: Connect back from the database host to this machine tunnelling traffic over HTTPS", "reverse_https"), |
| 96 | 5: ("Bind TCP: Listen on the database host for a connection", "bind_tcp"), |
| 97 | }, |
| 98 | "linux": { |
| 99 | 1: ("Reverse TCP: Connect back from the database host to this machine (default)", "reverse_tcp"), |
| 100 | 2: ("Bind TCP: Listen on the database host for a connection", "bind_tcp"), |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | self._msfEncodersList = { |
| 105 | "windows": { |
| 106 | 1: ("No Encoder", "generic/none"), |
| 107 | 2: ("Alpha2 Alphanumeric Mixedcase Encoder", "x86/alpha_mixed"), |
| 108 | 3: ("Alpha2 Alphanumeric Uppercase Encoder", "x86/alpha_upper"), |
| 109 | 4: ("Avoid UTF8/tolower", "x86/avoid_utf8_tolower"), |
| 110 | 5: ("Call+4 Dword XOR Encoder", "x86/call4_dword_xor"), |
| 111 | 6: ("Single-byte XOR Countdown Encoder", "x86/countdown"), |
| 112 | 7: ("Variable-length Fnstenv/mov Dword XOR Encoder", "x86/fnstenv_mov"), |
| 113 | 8: ("Polymorphic Jump/Call XOR Additive Feedback Encoder", "x86/jmp_call_additive"), |
| 114 | 9: ("Non-Alpha Encoder", "x86/nonalpha"), |
| 115 | 10: ("Non-Upper Encoder", "x86/nonupper"), |
| 116 | 11: ("Polymorphic XOR Additive Feedback Encoder (default)", "x86/shikata_ga_nai"), |
| 117 | 12: ("Alpha2 Alphanumeric Unicode Mixedcase Encoder", "x86/unicode_mixed"), |
| 118 | 13: ("Alpha2 Alphanumeric Unicode Uppercase Encoder", "x86/unicode_upper"), |
| 119 | } |
no test coverage detected