Commit 4e4799da by devttys0

Setup no longer checks for dependencies

parent e192d750
...@@ -16,7 +16,7 @@ all: build ...@@ -16,7 +16,7 @@ all: build
install: install:
make -C $(SRC_C_DIR) install make -C $(SRC_C_DIR) install
$(PYTHON) ./setup.py install --yes $(PYTHON) ./setup.py install
ldconfig || true ldconfig || true
build: build:
......
...@@ -15,13 +15,6 @@ try: ...@@ -15,13 +15,6 @@ try:
except NameError: except NameError:
raw_input = input raw_input = input
# This is super hacky.
if "--yes" in sys.argv:
sys.argv.pop(sys.argv.index("--yes"))
IGNORE_WARNINGS = True
else:
IGNORE_WARNINGS = False
# cd into the src directory, no matter where setup.py was invoked from # cd into the src directory, no matter where setup.py was invoked from
os.chdir(os.path.join(os.path.dirname(os.path.realpath(__file__)), "src")) os.chdir(os.path.join(os.path.dirname(os.path.realpath(__file__)), "src"))
...@@ -41,24 +34,6 @@ def which(command): ...@@ -41,24 +34,6 @@ def which(command):
return location return location
def warning(lines, terminate=True, prompt=True):
WIDTH = 115
if not IGNORE_WARNINGS:
print("\n" + "*" * WIDTH)
for line in lines:
print(line)
print("*" * WIDTH, "\n")
if prompt:
if raw_input('Continue anyway (Y/n)? ').lower().startswith('n'):
terminate = True
else:
terminate = False
if terminate:
sys.exit(1)
def find_binwalk_module_paths(): def find_binwalk_module_paths():
paths = [] paths = []
...@@ -127,19 +102,6 @@ class CleanCommand(Command): ...@@ -127,19 +102,6 @@ class CleanCommand(Command):
except Exception: except Exception:
pass pass
# Check pre-requisite Python modules during a build
if "build" in sys.argv:
print("checking pre-requisites")
try:
import pyqtgraph
from pyqtgraph.Qt import QtCore, QtGui, QtOpenGL
except ImportError as e:
msg = ["Pre-requisite warning: " + str(e),
"To take advantage of %s's graphing capabilities, please install this module." % MODULE_NAME,
]
warning(msg, prompt=True)
if "install" in sys.argv: if "install" in sys.argv:
# If an older version of binwalk is currently installed, completely remove it to prevent conflicts # If an older version of binwalk is currently installed, completely remove it to prevent conflicts
existing_binwalk_modules = find_binwalk_module_paths() existing_binwalk_modules = find_binwalk_module_paths()
......
...@@ -26,12 +26,12 @@ class Plotter(Module): ...@@ -26,12 +26,12 @@ class Plotter(Module):
kwargs={'axis' : 2, 'enabled' : True}, kwargs={'axis' : 2, 'enabled' : True},
description='Project data points onto 3D cube walls only'), description='Project data points onto 3D cube walls only'),
Option(short='Z', Option(short='Z',
long='max-points', long='points',
type=int, type=int,
kwargs={'max_points' : 0}, kwargs={'max_points' : 0},
description='Set the maximum number of plotted data points'), description='Set the maximum number of plotted data points'),
Option(short='V', Option(short='V',
long='show-grids', long='grids',
kwargs={'show_grids' : True}, kwargs={'show_grids' : True},
description='Display the x-y-z grids in the resulting plot'), description='Display the x-y-z grids in the resulting plot'),
] ]
......
...@@ -30,15 +30,15 @@ class Entropy(Module): ...@@ -30,15 +30,15 @@ class Entropy(Module):
kwargs={'enabled' : True}, kwargs={'enabled' : True},
description='Calculate file entropy'), description='Calculate file entropy'),
Option(short='J', Option(short='J',
long='save-plot', long='save',
kwargs={'save_plot' : True}, kwargs={'save_plot' : True},
description='Save plot as a PNG'), description='Save plot as a PNG'),
Option(short='N', Option(short='N',
long='no-plot', long='plot',
kwargs={'do_plot' : False}, kwargs={'do_plot' : False},
description='Do not generate an entropy plot graph'), description='Do not generate an entropy plot graph'),
Option(short='Q', Option(short='Q',
long='no-legend', long='legend',
kwargs={'show_legend' : False}, kwargs={'show_legend' : False},
description='Omit the legend from the entropy plot graph'), description='Omit the legend from the entropy plot graph'),
] ]
......
...@@ -52,7 +52,7 @@ class Extractor(Module): ...@@ -52,7 +52,7 @@ class Extractor(Module):
kwargs={'matryoshka' : 0}, kwargs={'matryoshka' : 0},
description='Limit matryoshka recursion depth (default: 8 levels deep)'), description='Limit matryoshka recursion depth (default: 8 levels deep)'),
Option(short='j', Option(short='j',
long='max-size', long='size',
type=int, type=int,
kwargs={'max_size' : 0}, kwargs={'max_size' : 0},
description='Limit the size of each extracted file'), description='Limit the size of each extracted file'),
......
...@@ -39,7 +39,7 @@ class General(Module): ...@@ -39,7 +39,7 @@ class General(Module):
kwargs={'swap_size' : 0}, kwargs={'swap_size' : 0},
description='Reverse every n bytes before scanning'), description='Reverse every n bytes before scanning'),
Option(short='I', Option(short='I',
long='show-invalid', long='invalid',
kwargs={'show_invalid' : True}, kwargs={'show_invalid' : True},
description='Show results marked as invalid'), description='Show results marked as invalid'),
Option(short='x', Option(short='x',
......
...@@ -16,7 +16,7 @@ class Signature(Module): ...@@ -16,7 +16,7 @@ class Signature(Module):
kwargs={'enabled' : True, 'force_default_scan' : True}, kwargs={'enabled' : True, 'force_default_scan' : True},
description='Scan target file(s) for common file signatures'), description='Scan target file(s) for common file signatures'),
Option(short='R', Option(short='R',
long='raw-bytes', long='raw',
kwargs={'enabled' : True, 'raw_bytes' : ''}, kwargs={'enabled' : True, 'raw_bytes' : ''},
type=str, type=str,
description='Scan target file(s) for the specified sequence of bytes'), description='Scan target file(s) for the specified sequence of bytes'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment