mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-06-09 17:51:33 +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:
parent
8c0ac767f4
commit
aefa7ef988
3 changed files with 52 additions and 62 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue