You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.3 KiB
43 lines
1.3 KiB
--- binwalk-1.2/src/setup.py
|
|
+++ binwalk-1.2/src/setup.py
|
|
@@ -5,39 +5,6 @@
|
|
|
|
WIDTH = 115
|
|
|
|
-# Check for pre-requisite modules
|
|
-print "checking pre-requisites"
|
|
-try:
|
|
- import magic
|
|
- try:
|
|
- magic.MAGIC_NO_CHECK_TEXT
|
|
- except Exception, e:
|
|
- print "\n", "*" * WIDTH
|
|
- print "Pre-requisite failure:", str(e)
|
|
- print "It looks like you have an old or incompatible magic module installed."
|
|
- print "Please install the official python-magic module, or download and install it from source: ftp://ftp.astron.com/pub/file/"
|
|
- print "*" * WIDTH, "\n"
|
|
- sys.exit(1)
|
|
-except Exception, e:
|
|
- print "\n", "*" * WIDTH
|
|
- print "Pre-requisite failure:", str(e)
|
|
- print "Please install the python-magic module, or download and install it from source: ftp://ftp.astron.com/pub/file/"
|
|
- print "*" * WIDTH, "\n"
|
|
- sys.exit(1)
|
|
-
|
|
-try:
|
|
- import matplotlib.pyplot
|
|
-except Exception, e:
|
|
- print "\n", "*" * WIDTH
|
|
- print "Pre-requisite check warning:", str(e)
|
|
- print "To take advantage of this tool's entropy plotting capabilities, please install the python-matplotlib module."
|
|
- print "*" * WIDTH, "\n"
|
|
-
|
|
- if raw_input('Continue installation without this module (Y/n)? ').lower().startswith('n'):
|
|
- print 'Quitting...\n'
|
|
- sys.exit(1)
|
|
-
|
|
-
|
|
# Generate a new magic file from the files in the magic directory
|
|
print "generating binwalk magic file"
|
|
magic_files = listdir("magic")
|