mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-02 20:54:13 +03:00
Minor update
This commit is contained in:
parent
0e44132778
commit
534c2ee0e6
|
@ -711,7 +711,7 @@ def getManualDirectories():
|
||||||
return directories
|
return directories
|
||||||
|
|
||||||
def getAutoDirectories():
|
def getAutoDirectories():
|
||||||
directories = set("/")
|
retVal = set("/")
|
||||||
|
|
||||||
if kb.absFilePaths:
|
if kb.absFilePaths:
|
||||||
infoMsg = "retrieved web server absolute paths: "
|
infoMsg = "retrieved web server absolute paths: "
|
||||||
|
@ -722,17 +722,17 @@ def getAutoDirectories():
|
||||||
if absFilePath:
|
if absFilePath:
|
||||||
directory = directoryPath(absFilePath)
|
directory = directoryPath(absFilePath)
|
||||||
directory = ntToPosixSlashes(directory)
|
directory = ntToPosixSlashes(directory)
|
||||||
directories.add(directory)
|
retVal.add(directory)
|
||||||
else:
|
else:
|
||||||
warnMsg = "unable to retrieve automatically any web server path"
|
warnMsg = "unable to retrieve automatically any web server path"
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
|
|
||||||
webDir = extractRegexResult(r"//[^/]+?(?P<result>/.*)/", conf.url)
|
_ = extractRegexResult(r"//[^/]+?(?P<result>/.*)/", conf.url) # web directory
|
||||||
|
|
||||||
if webDir:
|
if _:
|
||||||
directories.add(webDir)
|
retVal.add(_)
|
||||||
|
|
||||||
return list(directories)
|
return list(retVal)
|
||||||
|
|
||||||
def filePathToSafeString(filePath):
|
def filePathToSafeString(filePath):
|
||||||
"""
|
"""
|
||||||
|
@ -1351,6 +1351,10 @@ def parseFilePaths(page):
|
||||||
kb.absFilePaths.add(absFilePath)
|
kb.absFilePaths.add(absFilePath)
|
||||||
|
|
||||||
def getLocalIP():
|
def getLocalIP():
|
||||||
|
"""
|
||||||
|
Get local IP address (exposed to the remote/target)
|
||||||
|
"""
|
||||||
|
|
||||||
retVal = None
|
retVal = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -1366,6 +1370,10 @@ def getLocalIP():
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def getRemoteIP():
|
def getRemoteIP():
|
||||||
|
"""
|
||||||
|
Get remote/target IP address
|
||||||
|
"""
|
||||||
|
|
||||||
retVal = None
|
retVal = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -1529,6 +1537,10 @@ def getPageWordSet(page):
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def showStaticWords(firstPage, secondPage):
|
def showStaticWords(firstPage, secondPage):
|
||||||
|
"""
|
||||||
|
Prints words appearing in two different response pages
|
||||||
|
"""
|
||||||
|
|
||||||
infoMsg = "finding static words in longest matching part of dynamic page content"
|
infoMsg = "finding static words in longest matching part of dynamic page content"
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
|
@ -3694,6 +3706,10 @@ def splitFields(fields, delimiter=','):
|
||||||
return [fields[x + 1:y] for (x, y) in zip(commas, commas[1:])]
|
return [fields[x + 1:y] for (x, y) in zip(commas, commas[1:])]
|
||||||
|
|
||||||
def pollProcess(process, suppress_errors=False):
|
def pollProcess(process, suppress_errors=False):
|
||||||
|
"""
|
||||||
|
Checks for process status (prints . if still running)
|
||||||
|
"""
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
dataToStdout(".")
|
dataToStdout(".")
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user