mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-27 08:23:14 +03:00
some more refactoring
This commit is contained in:
parent
e1f86c97c4
commit
0e23521adc
|
@ -7,6 +7,7 @@ Copyright (c) 2006-2012 sqlmap developers (http://www.sqlmap.org/)
|
||||||
See the file 'doc/COPYING' for copying permission
|
See the file 'doc/COPYING' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
import pickle
|
import pickle
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
|
|
@ -286,12 +286,12 @@ class Backend:
|
||||||
msg += "correct [%s (default)/%s] " % (kb.dbms, dbms)
|
msg += "correct [%s (default)/%s] " % (kb.dbms, dbms)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
inp = readInput(msg, default=kb.dbms)
|
_ = readInput(msg, default=kb.dbms)
|
||||||
|
|
||||||
if aliasToDbmsEnum(inp) == kb.dbms:
|
if aliasToDbmsEnum(_) == kb.dbms:
|
||||||
break
|
break
|
||||||
elif aliasToDbmsEnum(inp) == dbms:
|
elif aliasToDbmsEnum(_) == dbms:
|
||||||
kb.dbms = aliasToDbmsEnum(inp)
|
kb.dbms = aliasToDbmsEnum(_)
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
warnMsg = "invalid value"
|
warnMsg = "invalid value"
|
||||||
|
@ -344,12 +344,12 @@ class Backend:
|
||||||
msg += "correct [%s (default)/%s] " % (kb.os, os)
|
msg += "correct [%s (default)/%s] " % (kb.os, os)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
inp = readInput(msg, default=kb.os)
|
_ = readInput(msg, default=kb.os)
|
||||||
|
|
||||||
if inp == kb.os:
|
if _ == kb.os:
|
||||||
break
|
break
|
||||||
elif inp == os:
|
elif _ == os:
|
||||||
kb.os = inp.capitalize()
|
kb.os = _.capitalize()
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
warnMsg = "invalid value"
|
warnMsg = "invalid value"
|
||||||
|
@ -383,10 +383,10 @@ class Backend:
|
||||||
msg += "\n[2] 64-bit"
|
msg += "\n[2] 64-bit"
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
arch = readInput(msg, default='1')
|
_ = readInput(msg, default='1')
|
||||||
|
|
||||||
if isinstance(arch, basestring) and arch.isdigit() and int(arch) in ( 1, 2 ):
|
if isinstance(_, basestring) and _.isdigit() and int(_) in ( 1, 2 ):
|
||||||
if int(arch) == 1:
|
if int(_) == 1:
|
||||||
kb.arch = 32
|
kb.arch = 32
|
||||||
else:
|
else:
|
||||||
kb.arch = 64
|
kb.arch = 64
|
||||||
|
|
|
@ -61,6 +61,7 @@ def getCurrentThreadUID():
|
||||||
return hash(threading.currentThread())
|
return hash(threading.currentThread())
|
||||||
|
|
||||||
def readInput(message, default=None):
|
def readInput(message, default=None):
|
||||||
|
# It will be overwritten by original from lib.core.common
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def getCurrentThreadData():
|
def getCurrentThreadData():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user