mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
Avoid libmagic traceback on Windows.
WARNING: this release is a candidate, it only works on Linux/Unices for the moment!
This commit is contained in:
@@ -742,7 +742,10 @@ def getRemoteIP():
|
||||
|
||||
|
||||
def getFileType(filePath):
|
||||
magicFileType = magic.from_file(filePath)
|
||||
try:
|
||||
magicFileType = magic.from_file(filePath)
|
||||
except:
|
||||
return "unknown"
|
||||
|
||||
if "ASCII" in magicFileType or "text" in magicFileType:
|
||||
return "text"
|
||||
|
||||
Reference in New Issue
Block a user