mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
Bug fix (bad idea is to do os.path.join on web URLs - especially on Windows OS)
This commit is contained in:
parent
d05bfdd7dd
commit
43df4efd11
|
@ -5,6 +5,7 @@ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/)
|
|||
See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
import urlparse
|
||||
import os
|
||||
import re
|
||||
import StringIO
|
||||
|
@ -222,9 +223,9 @@ class Web:
|
|||
logger.info(infoMsg)
|
||||
self._webFileInject(stagerContent, stagerName, directory)
|
||||
|
||||
for x in list(re.finditer('/', directory)):
|
||||
self.webBaseUrl = "%s://%s:%d%s" % (conf.scheme, conf.hostname, conf.port, directory[x.start():])
|
||||
self.webStagerUrl = os.path.join(self.webBaseUrl, stagerName)
|
||||
for match in re.finditer('/', directory):
|
||||
self.webBaseUrl = "%s://%s:%d%s" % (conf.scheme, conf.hostname, conf.port, directory[match.start():])
|
||||
self.webStagerUrl = urlparse.urljoin(self.webBaseUrl, stagerName)
|
||||
self.webStagerFilePath = ntToPosixSlashes(os.path.join(directory, stagerName))
|
||||
|
||||
debugMsg = "trying to see if the file is accessible from %s" % self.webStagerUrl
|
||||
|
|
Loading…
Reference in New Issue
Block a user