mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-05-14 01:16:59 +00:00
Code refactoring (epecially Google search code)
This commit is contained in:
parent
76b793b199
commit
2de52927f3
5 changed files with 62 additions and 88 deletions
|
|
@ -242,22 +242,22 @@ def start():
|
|||
return True
|
||||
|
||||
if conf.url and not any((conf.forms, conf.crawlDepth)):
|
||||
kb.targetUrls.add((conf.url, conf.method, conf.data, conf.cookie))
|
||||
kb.targets.add((conf.url, conf.method, conf.data, conf.cookie))
|
||||
|
||||
if conf.configFile and not kb.targetUrls:
|
||||
if conf.configFile and not kb.targets:
|
||||
errMsg = "you did not edit the configuration file properly, set "
|
||||
errMsg += "the target url, list of targets or google dork"
|
||||
logger.error(errMsg)
|
||||
return False
|
||||
|
||||
if kb.targetUrls and len(kb.targetUrls) > 1:
|
||||
infoMsg = "sqlmap got a total of %d targets" % len(kb.targetUrls)
|
||||
if kb.targets and len(kb.targets) > 1:
|
||||
infoMsg = "sqlmap got a total of %d targets" % len(kb.targets)
|
||||
logger.info(infoMsg)
|
||||
|
||||
hostCount = 0
|
||||
cookieStr = ""
|
||||
|
||||
for targetUrl, targetMethod, targetData, targetCookie in kb.targetUrls:
|
||||
for targetUrl, targetMethod, targetData, targetCookie in kb.targets:
|
||||
try:
|
||||
conf.url = targetUrl
|
||||
conf.method = targetMethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue