mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-10-24 12:44:29 +00:00
Fixes #3637
This commit is contained in:
parent
5ae78b1d85
commit
7a179889a3
4 changed files with 8 additions and 5 deletions
|
|
@ -1800,9 +1800,11 @@ def getFileType(filePath):
|
|||
"""
|
||||
|
||||
try:
|
||||
desc = getUnicode(magic.from_file(filePath) or "")
|
||||
desc = magic.from_file(filePath) or magic.MAGIC_UNKNOWN_FILETYPE
|
||||
except:
|
||||
desc = magic.MAGIC_UNKNOWN_FILETYPE
|
||||
finally:
|
||||
desc = getText(desc)
|
||||
|
||||
if desc == magic.MAGIC_UNKNOWN_FILETYPE:
|
||||
content = openFile(filePath, "rb", encoding=None).read()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue