File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343from lib .core .data import queries
4444from lib .core .data import temp
4545from lib .core .exception import sqlmapFilePathException
46+ from lib .core .settings import PLATFORM
4647from lib .core .settings import SQL_STATEMENTS
4748from lib .core .settings import VERSION_STRING
4849
@@ -825,3 +826,22 @@ def getCharset(charsetType=None):
825826 asciiTbl .extend (range (96 , 123 ))
826827
827828 return asciiTbl
829+
830+
831+ def searchEnvPath (fileName ):
832+ envPaths = os .environ ["PATH" ]
833+ result = None
834+
835+ if "darwin" not in PLATFORM and "win" in PLATFORM :
836+ envPaths = envPaths .split (";" )
837+ else :
838+ envPaths = envPaths .split (":" )
839+
840+ for envPath in envPaths :
841+ envPath = envPath .replace (";" , "" )
842+ result = os .path .exists (os .path .normpath ("%s/%s" % (envPath , fileName )))
843+
844+ if result == True :
845+ break
846+
847+ return result
You can’t perform that action at this time.
0 commit comments