mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
minor update
This commit is contained in:
parent
b18397fbc7
commit
818c9787b2
|
@ -213,12 +213,21 @@ class Web:
|
|||
localPath = directory
|
||||
uriPath = directory[2:] if isWindowsDriveLetterPath(directory) else directory
|
||||
docRoot = docRoot[2:] if isWindowsDriveLetterPath(docRoot) else docRoot
|
||||
uriPath = uriPath.replace(docRoot, "/")
|
||||
uriPath = "/%s" % normalizePath(uriPath)
|
||||
uriPath = uriPath.replace("//", "/")
|
||||
if docRoot in uriPath:
|
||||
uriPath = uriPath.replace(docRoot, "/")
|
||||
uriPath = "/%s" % normalizePath(uriPath)
|
||||
else:
|
||||
webDir = extractRegexResult(r"//[^/]+?/(?P<result>.*)/.", conf.url)
|
||||
if webDir:
|
||||
uriPath = "/%s" % webDir
|
||||
else:
|
||||
continue
|
||||
|
||||
uriPath = uriPath.replace("//", "/").rstrip('/')
|
||||
localPath = localPath.rstrip('/')
|
||||
uriPath = uriPath.rstrip('/')
|
||||
|
||||
if not uriPath:
|
||||
uriPath = '/'
|
||||
|
||||
# Upload the file stager
|
||||
self.__webFileInject(stagerContent, stagerName, localPath)
|
||||
|
|
Loading…
Reference in New Issue
Block a user