Skip to content

Commit

Permalink
Removed safe checks for file magic
Browse files Browse the repository at this point in the history
  • Loading branch information
nex committed Mar 15, 2012
1 parent 73a68d7 commit 2ae2079
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cuckoo/common/getfiletype.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@

try:
import magic
IS_MAGIC = True
except (ImportError, AttributeError), why:
IS_MAGIC = False
pass

def get_file_type(file_path):
"""
Expand All @@ -38,9 +37,6 @@ def get_file_type(file_path):
if not os.path.exists(file_path):
return None

if not IS_MAGIC:
return None

data = open(file_path, "rb").read()

# Thanks to Jesse from malc0de.com for this suggestion.
Expand Down

0 comments on commit 2ae2079

Please sign in to comment.