@@ -711,7 +711,7 @@ def getManualDirectories():
711711 return directories
712712
713713def getAutoDirectories ():
714- directories = set ("/" )
714+ retVal = set ("/" )
715715
716716 if kb .absFilePaths :
717717 infoMsg = "retrieved web server absolute paths: "
@@ -722,17 +722,17 @@ def getAutoDirectories():
722722 if absFilePath :
723723 directory = directoryPath (absFilePath )
724724 directory = ntToPosixSlashes (directory )
725- directories .add (directory )
725+ retVal .add (directory )
726726 else :
727727 warnMsg = "unable to retrieve automatically any web server path"
728728 logger .warn (warnMsg )
729729
730- webDir = extractRegexResult (r"//[^/]+?(?P<result>/.*)/" , conf .url )
730+ _ = extractRegexResult (r"//[^/]+?(?P<result>/.*)/" , conf .url ) # web directory
731731
732- if webDir :
733- directories .add (webDir )
732+ if _ :
733+ retVal .add (_ )
734734
735- return list (directories )
735+ return list (retVal )
736736
737737def filePathToSafeString (filePath ):
738738 """
@@ -1351,6 +1351,10 @@ def parseFilePaths(page):
13511351 kb .absFilePaths .add (absFilePath )
13521352
13531353def getLocalIP ():
1354+ """
1355+ Get local IP address (exposed to the remote/target)
1356+ """
1357+
13541358 retVal = None
13551359
13561360 try :
@@ -1366,6 +1370,10 @@ def getLocalIP():
13661370 return retVal
13671371
13681372def getRemoteIP ():
1373+ """
1374+ Get remote/target IP address
1375+ """
1376+
13691377 retVal = None
13701378
13711379 try :
@@ -1529,6 +1537,10 @@ def getPageWordSet(page):
15291537 return retVal
15301538
15311539def showStaticWords (firstPage , secondPage ):
1540+ """
1541+ Prints words appearing in two different response pages
1542+ """
1543+
15321544 infoMsg = "finding static words in longest matching part of dynamic page content"
15331545 logger .info (infoMsg )
15341546
@@ -3694,6 +3706,10 @@ def splitFields(fields, delimiter=','):
36943706 return [fields [x + 1 :y ] for (x , y ) in zip (commas , commas [1 :])]
36953707
36963708def pollProcess (process , suppress_errors = False ):
3709+ """
3710+ Checks for process status (prints . if still running)
3711+ """
3712+
36973713 while True :
36983714 dataToStdout ("." )
36993715 time .sleep (1 )
0 commit comments