@@ -92,11 +92,11 @@ def start():
9292 """
9393
9494 if conf .url :
95- kb .targetUrls . add ( conf .url )
95+ kb .targetUrls [ conf .url ] = None
9696
9797 if conf .configFile and not kb .targetUrls :
9898 errMsg = "you did not edit the configuration file properly, set "
99- errMsg += "the target url"
99+ errMsg += "the target url, list of targets or google dork "
100100 logger .error (errMsg )
101101
102102 hostCount = 0
@@ -105,15 +105,17 @@ def start():
105105 cookieStr = ""
106106 setCookieAsInjectable = True
107107
108- for targetUrl in kb .targetUrls :
109- if conf .googleDork :
108+ for targetUrl , _ in kb .targetUrls . items () :
109+ if conf .multipleTargets :
110110 hostCount += 1
111111
112112 message = "url %d: %s, " % (hostCount , targetUrl )
113113 message += "do you want to test this url? [Y/n/q] "
114114 test = readInput (message , default = "Y" )
115115
116- if test [0 ] in ("n" , "N" ):
116+ if not test :
117+ pass
118+ elif test [0 ] in ("n" , "N" ):
117119 continue
118120 elif test [0 ] in ("q" , "Q" ):
119121 break
@@ -166,7 +168,7 @@ def start():
166168 errMsg += "to the user's manual paragraph 'String match' "
167169 errMsg += "for details"
168170
169- if conf .googleDork :
171+ if conf .multipleTargets :
170172 errMsg += ", skipping to next url"
171173 logger .warn (errMsg )
172174
@@ -219,12 +221,12 @@ def start():
219221 kb .injPlace , kb .injParameter , kb .injType = injDataSelected
220222 setInjection ()
221223
222- if not conf .googleDork and ( not kb .injPlace or not kb .injParameter or not kb .injType ):
224+ if not conf .multipleTargets and ( not kb .injPlace or not kb .injParameter or not kb .injType ):
223225 raise sqlmapNotVulnerableException , "all parameters are not injectable"
224226 elif kb .injPlace and kb .injParameter and kb .injType :
225227 condition = False
226228
227- if conf .googleDork :
229+ if conf .multipleTargets :
228230 message = "do you want to exploit this SQL injection? [Y/n] "
229231 exploit = readInput (message , default = "Y" )
230232
0 commit comments