Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d55ec1

Browse files
committed
Minor code restyling
1 parent e29e8f8 commit 2d55ec1

3 files changed

Lines changed: 8 additions & 11 deletions

File tree

doc/THANKS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ Chris Patten <[email protected]>
203203
Adam Pridgen <[email protected]>
204204
for suggesting some features
205205

206+
Ole Rasmussen <[email protected]>
207+
for reporting a bug
208+
206209
Alberto Revelli <[email protected]>
207210
for inspiring me to write sqlmap user's manual in SGML
208211
for his great Microsoft SQL Server take over tool, sqlninja,

lib/core/option.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@
5555
from lib.core.exception import sqlmapSyntaxException
5656
from lib.core.exception import sqlmapUnsupportedDBMSException
5757
from lib.core.optiondict import optDict
58-
from lib.core.settings import MSSQL_ALIASES
59-
from lib.core.settings import MYSQL_ALIASES
60-
from lib.core.settings import PGSQL_ALIASES
61-
from lib.core.settings import ORACLE_ALIASES
62-
from lib.core.settings import SQLITE_ALIASES
63-
from lib.core.settings import ACCESS_ALIASES
64-
from lib.core.settings import FIREBIRD_ALIASES
6558
from lib.core.settings import IS_WIN
6659
from lib.core.settings import PLATFORM
6760
from lib.core.settings import SITE
@@ -494,8 +487,7 @@ def __setDBMS():
494487
logger.debug(debugMsg)
495488

496489
conf.dbms = conf.dbms.lower()
497-
aliases = MSSQL_ALIASES + MYSQL_ALIASES + PGSQL_ALIASES + ORACLE_ALIASES + SQLITE_ALIASES + ACCESS_ALIASES + FIREBIRD_ALIASES
498-
firstRegExp = "(%s)" % "|".join([alias for alias in aliases])
490+
firstRegExp = "(%s)" % "|".join([alias for alias in SUPPORTED_DBMS])
499491
dbmsRegExp = re.search("%s ([\d\.]+)" % firstRegExp, conf.dbms)
500492

501493
if dbmsRegExp:

lib/core/target.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,13 @@ def initTargetEnv():
222222
"""
223223

224224
if conf.multipleTargets:
225+
if conf.cj:
226+
conf.cj.clear()
227+
225228
conf.paramDict = {}
226229
conf.parameters = {}
227230
conf.sessionFile = None
231+
228232
kb.dbms = None
229233
kb.dbmsDetected = False
230234
kb.dbmsVersion = None
@@ -235,8 +239,6 @@ def initTargetEnv():
235239
kb.unionComment = ""
236240
kb.unionCount = None
237241
kb.unionPosition = None
238-
if conf.cj:
239-
conf.cj.clear()
240242

241243
def setupTargetEnv():
242244
__createTargetDirs()

0 commit comments

Comments
 (0)