mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
attempt to handle standard input from --live-test
This commit is contained in:
parent
2b6ee06de0
commit
ac77724970
|
@ -18,6 +18,7 @@ from extra.beep.beep import beep
|
||||||
from lib.controller.controller import start
|
from lib.controller.controller import start
|
||||||
from lib.core.common import clearConsoleLine
|
from lib.core.common import clearConsoleLine
|
||||||
from lib.core.common import dataToStdout
|
from lib.core.common import dataToStdout
|
||||||
|
from lib.core.common import getUnicode
|
||||||
from lib.core.common import randomStr
|
from lib.core.common import randomStr
|
||||||
from lib.core.common import readXmlFile
|
from lib.core.common import readXmlFile
|
||||||
from lib.core.data import conf
|
from lib.core.data import conf
|
||||||
|
@ -26,6 +27,7 @@ from lib.core.data import paths
|
||||||
from lib.core.log import LOGGER_HANDLER
|
from lib.core.log import LOGGER_HANDLER
|
||||||
from lib.core.option import init
|
from lib.core.option import init
|
||||||
from lib.core.optiondict import optDict
|
from lib.core.optiondict import optDict
|
||||||
|
from lib.core.settings import UNICODE_ENCODING
|
||||||
from lib.parse.cmdline import cmdLineParser
|
from lib.parse.cmdline import cmdLineParser
|
||||||
|
|
||||||
failedItem = None
|
failedItem = None
|
||||||
|
@ -239,8 +241,6 @@ def runCase(switches=None, parse=None):
|
||||||
ifile.close()
|
ifile.close()
|
||||||
|
|
||||||
for item, console_output in parse:
|
for item, console_output in parse:
|
||||||
from lib.core.common import getUnicode
|
|
||||||
from lib.core.settings import UNICODE_ENCODING
|
|
||||||
if console_output is True:
|
if console_output is True:
|
||||||
parse_on = getUnicode(console, UNICODE_ENCODING)
|
parse_on = getUnicode(console, UNICODE_ENCODING)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -486,6 +486,9 @@ class Metasploit:
|
||||||
else:
|
else:
|
||||||
proc.stdin.write("uname -a ; id\n")
|
proc.stdin.write("uname -a ; id\n")
|
||||||
|
|
||||||
|
if conf.liveTest:
|
||||||
|
proc.stdin.write("exit\n")
|
||||||
|
|
||||||
metSess = re.search("Meterpreter session ([\d]+) opened", out)
|
metSess = re.search("Meterpreter session ([\d]+) opened", out)
|
||||||
|
|
||||||
if metSess:
|
if metSess:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user