mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +03:00
bug fix for 404 program termination during shell upload attempt
This commit is contained in:
parent
565433097e
commit
7c88e32f9d
|
@ -70,6 +70,7 @@ class Connect:
|
|||
direct = kwargs.get('direct', False)
|
||||
multipart = kwargs.get('multipart', False)
|
||||
silent = kwargs.get('silent', False)
|
||||
raise404 = kwargs.get('raise404', True)
|
||||
|
||||
page = ""
|
||||
cookieStr = ""
|
||||
|
@ -168,7 +169,7 @@ class Connect:
|
|||
exceptionMsg = "not authorized, try to provide right HTTP "
|
||||
exceptionMsg += "authentication type and valid credentials"
|
||||
raise sqlmapConnectionException, exceptionMsg
|
||||
elif e.code == 404:
|
||||
elif e.code == 404 and raise404:
|
||||
exceptionMsg = "page not found"
|
||||
raise sqlmapConnectionException, exceptionMsg
|
||||
else:
|
||||
|
|
|
@ -181,7 +181,7 @@ class Web:
|
|||
self.webBaseUrl = "%s://%s:%d%s" % (conf.scheme, conf.hostname, conf.port, requestDir)
|
||||
self.webUploaderUrl = "%s/%s" % (self.webBaseUrl, uploaderName)
|
||||
self.webUploaderUrl = self.webUploaderUrl.replace("./", "/").replace("\\", "/")
|
||||
uplPage, _ = Request.getPage(url=self.webUploaderUrl, direct=True)
|
||||
uplPage, _ = Request.getPage(url=self.webUploaderUrl, direct=True, raise404=False)
|
||||
|
||||
if "sqlmap file uploader" not in uplPage:
|
||||
warnMsg = "unable to upload the uploader "
|
||||
|
|
Loading…
Reference in New Issue
Block a user