File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131from lib .controller .checks import checkConnection
3232from lib .core .common import paramToDict
3333from lib .core .common import parseTargetUrl
34- from lib .core .common import pop
35- from lib .core .common import push
3634from lib .core .common import readInput
3735from lib .core .data import conf
3836from lib .core .data import kb
@@ -105,10 +103,6 @@ def start():
105103 if kb .targetUrls and len (kb .targetUrls ) > 1 :
106104 infoMsg = "sqlmap got a total of %d targets" % len (kb .targetUrls )
107105 logger .info (infoMsg )
108-
109- if conf .multipleTargets :
110- push (conf .raise404 )
111- conf .raise404 = False
112106
113107 hostCount = 0
114108 cookieStr = ""
@@ -273,12 +267,7 @@ def start():
273267 logger .error (e )
274268 else :
275269 logger .error (e )
276- if conf .multipleTargets :
277- conf .raise404 = pop ()
278270 return
279271
280- if conf .multipleTargets :
281- conf .raise404 = pop ()
282-
283272 if conf .loggedToOut :
284273 logger .info ("Fetched data logged to text files under '%s'" % conf .outputPath )
Original file line number Diff line number Diff line change @@ -939,9 +939,3 @@ def posixToNtSlashes(filepath):
939939
940940def ntToPosixSlashes (filepath ):
941941 return filepath .replace ('\\ ' , '/' )
942-
943- def push (value ):
944- conf .stack .append (value )
945-
946- def pop ():
947- return conf .stack .pop ()
Original file line number Diff line number Diff line change @@ -957,14 +957,12 @@ def __setConfAttributes():
957957 conf .path = None
958958 conf .port = None
959959 conf .progressWidth = 54
960- conf .raise404 = True
961960 conf .retriesCount = 0
962961 conf .scheme = None
963962 #conf.seqMatcher = difflib.SequenceMatcher(lambda x: x in " \t")
964963 conf .seqMatcher = difflib .SequenceMatcher (None )
965964 conf .seqLock = None
966965 conf .sessionFP = None
967- conf .stack = []
968966 conf .start = True
969967 conf .threadContinue = True
970968 conf .threadException = False
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ def getPage(**kwargs):
7070 direct = kwargs .get ('direct' , False )
7171 multipart = kwargs .get ('multipart' , False )
7272 silent = kwargs .get ('silent' , False )
73- raise404 = kwargs .get ('raise404' , None )
73+ raise404 = kwargs .get ('raise404' , True )
7474
7575 page = ""
7676 cookieStr = ""
@@ -181,7 +181,7 @@ def getPage(**kwargs):
181181 errMsg = "not authorized, try to provide right HTTP "
182182 errMsg += "authentication type and valid credentials"
183183 raise sqlmapConnectionException , errMsg
184- elif e .code == 404 and ( raise404 or ( raise404 is None and conf . raise404 )) :
184+ elif e .code == 404 and raise404 :
185185 errMsg = "page not found"
186186 raise sqlmapConnectionException , errMsg
187187 else :
You can’t perform that action at this time.
0 commit comments