mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 04:31:30 +00:00
Some more PEPing (I hope that I haven't broke anything)
This commit is contained in:
@@ -81,6 +81,7 @@ class Metasploit:
|
||||
_ = normalizePath(os.path.join(_, ".."))
|
||||
if _ == old:
|
||||
break
|
||||
|
||||
self._msfCli = "%s & ruby %s" % (_, self._msfCli)
|
||||
self._msfConsole = "%s & ruby %s" % (_, self._msfConsole)
|
||||
self._msfEncode = "ruby %s" % self._msfEncode
|
||||
@@ -88,60 +89,60 @@ class Metasploit:
|
||||
self._msfVenom = "%s & ruby %s" % (_, self._msfVenom)
|
||||
|
||||
self._msfPayloadsList = {
|
||||
"windows": {
|
||||
1: ("Meterpreter (default)", "windows/meterpreter"),
|
||||
2: ("Shell", "windows/shell"),
|
||||
3: ("VNC", "windows/vncinject"),
|
||||
},
|
||||
"linux": {
|
||||
1: ("Shell (default)", "linux/x86/shell"),
|
||||
2: ("Meterpreter (beta)", "linux/x86/meterpreter"),
|
||||
}
|
||||
}
|
||||
"windows": {
|
||||
1: ("Meterpreter (default)", "windows/meterpreter"),
|
||||
2: ("Shell", "windows/shell"),
|
||||
3: ("VNC", "windows/vncinject"),
|
||||
},
|
||||
"linux": {
|
||||
1: ("Shell (default)", "linux/x86/shell"),
|
||||
2: ("Meterpreter (beta)", "linux/x86/meterpreter"),
|
||||
}
|
||||
}
|
||||
|
||||
self._msfConnectionsList = {
|
||||
"windows": {
|
||||
1: ("Reverse TCP: Connect back from the database host to this machine (default)", "reverse_tcp"),
|
||||
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"),
|
||||
3: ("Reverse HTTP: Connect back from the database host to this machine tunnelling traffic over HTTP", "reverse_http"),
|
||||
4: ("Reverse HTTPS: Connect back from the database host to this machine tunnelling traffic over HTTPS", "reverse_https"),
|
||||
5: ("Bind TCP: Listen on the database host for a connection", "bind_tcp"),
|
||||
},
|
||||
"linux": {
|
||||
1: ("Reverse TCP: Connect back from the database host to this machine (default)", "reverse_tcp"),
|
||||
2: ("Bind TCP: Listen on the database host for a connection", "bind_tcp"),
|
||||
}
|
||||
}
|
||||
"windows": {
|
||||
1: ("Reverse TCP: Connect back from the database host to this machine (default)", "reverse_tcp"),
|
||||
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"),
|
||||
3: ("Reverse HTTP: Connect back from the database host to this machine tunnelling traffic over HTTP", "reverse_http"),
|
||||
4: ("Reverse HTTPS: Connect back from the database host to this machine tunnelling traffic over HTTPS", "reverse_https"),
|
||||
5: ("Bind TCP: Listen on the database host for a connection", "bind_tcp"),
|
||||
},
|
||||
"linux": {
|
||||
1: ("Reverse TCP: Connect back from the database host to this machine (default)", "reverse_tcp"),
|
||||
2: ("Bind TCP: Listen on the database host for a connection", "bind_tcp"),
|
||||
}
|
||||
}
|
||||
|
||||
self._msfEncodersList = {
|
||||
"windows": {
|
||||
1: ("No Encoder", "generic/none"),
|
||||
2: ("Alpha2 Alphanumeric Mixedcase Encoder", "x86/alpha_mixed"),
|
||||
3: ("Alpha2 Alphanumeric Uppercase Encoder", "x86/alpha_upper"),
|
||||
4: ("Avoid UTF8/tolower", "x86/avoid_utf8_tolower"),
|
||||
5: ("Call+4 Dword XOR Encoder", "x86/call4_dword_xor"),
|
||||
6: ("Single-byte XOR Countdown Encoder", "x86/countdown"),
|
||||
7: ("Variable-length Fnstenv/mov Dword XOR Encoder", "x86/fnstenv_mov"),
|
||||
8: ("Polymorphic Jump/Call XOR Additive Feedback Encoder", "x86/jmp_call_additive"),
|
||||
9: ("Non-Alpha Encoder", "x86/nonalpha"),
|
||||
10: ("Non-Upper Encoder", "x86/nonupper"),
|
||||
11: ("Polymorphic XOR Additive Feedback Encoder (default)", "x86/shikata_ga_nai"),
|
||||
12: ("Alpha2 Alphanumeric Unicode Mixedcase Encoder", "x86/unicode_mixed"),
|
||||
13: ("Alpha2 Alphanumeric Unicode Uppercase Encoder", "x86/unicode_upper"),
|
||||
}
|
||||
}
|
||||
"windows": {
|
||||
1: ("No Encoder", "generic/none"),
|
||||
2: ("Alpha2 Alphanumeric Mixedcase Encoder", "x86/alpha_mixed"),
|
||||
3: ("Alpha2 Alphanumeric Uppercase Encoder", "x86/alpha_upper"),
|
||||
4: ("Avoid UTF8/tolower", "x86/avoid_utf8_tolower"),
|
||||
5: ("Call+4 Dword XOR Encoder", "x86/call4_dword_xor"),
|
||||
6: ("Single-byte XOR Countdown Encoder", "x86/countdown"),
|
||||
7: ("Variable-length Fnstenv/mov Dword XOR Encoder", "x86/fnstenv_mov"),
|
||||
8: ("Polymorphic Jump/Call XOR Additive Feedback Encoder", "x86/jmp_call_additive"),
|
||||
9: ("Non-Alpha Encoder", "x86/nonalpha"),
|
||||
10: ("Non-Upper Encoder", "x86/nonupper"),
|
||||
11: ("Polymorphic XOR Additive Feedback Encoder (default)", "x86/shikata_ga_nai"),
|
||||
12: ("Alpha2 Alphanumeric Unicode Mixedcase Encoder", "x86/unicode_mixed"),
|
||||
13: ("Alpha2 Alphanumeric Unicode Uppercase Encoder", "x86/unicode_upper"),
|
||||
}
|
||||
}
|
||||
|
||||
self._msfSMBPortsList = {
|
||||
"windows": {
|
||||
1: ("139/TCP", "139"),
|
||||
2: ("445/TCP (default)", "445"),
|
||||
}
|
||||
}
|
||||
"windows": {
|
||||
1: ("139/TCP", "139"),
|
||||
2: ("445/TCP (default)", "445"),
|
||||
}
|
||||
}
|
||||
|
||||
self._portData = {
|
||||
"bind": "remote port number",
|
||||
"reverse": "local port number",
|
||||
}
|
||||
"bind": "remote port number",
|
||||
"reverse": "local port number",
|
||||
}
|
||||
|
||||
def _skeletonSelection(self, msg, lst=None, maxValue=1, default=1):
|
||||
if Backend.isOs(OS.WINDOWS):
|
||||
@@ -484,10 +485,13 @@ class Metasploit:
|
||||
|
||||
send_all(proc, "use espia\n")
|
||||
send_all(proc, "use incognito\n")
|
||||
# This extension is loaded by default since Metasploit > 3.7
|
||||
#send_all(proc, "use priv\n")
|
||||
# This extension freezes the connection on 64-bit systems
|
||||
#send_all(proc, "use sniffer\n")
|
||||
|
||||
# This extension is loaded by default since Metasploit > 3.7:
|
||||
# send_all(proc, "use priv\n")
|
||||
|
||||
# This extension freezes the connection on 64-bit systems:
|
||||
# send_all(proc, "use sniffer\n")
|
||||
|
||||
send_all(proc, "sysinfo\n")
|
||||
send_all(proc, "getuid\n")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user