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

Skip to content

Commit 3b3353e

Browse files
committed
Revert last commit
1 parent 1dfe558 commit 3b3353e

4 files changed

Lines changed: 2 additions & 21 deletions

File tree

lib/controller/controller.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
from lib.controller.checks import checkConnection
3232
from lib.core.common import paramToDict
3333
from lib.core.common import parseTargetUrl
34-
from lib.core.common import pop
35-
from lib.core.common import push
3634
from lib.core.common import readInput
3735
from lib.core.data import conf
3836
from 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)

lib/core/common.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -939,9 +939,3 @@ def posixToNtSlashes(filepath):
939939

940940
def 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()

lib/core/option.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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

lib/request/connect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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:

0 commit comments

Comments
 (0)