Commit 4e4799da by devttys0

Setup no longer checks for dependencies

parent e192d750
......@@ -16,7 +16,7 @@ all: build
install:
make -C $(SRC_C_DIR) install
$(PYTHON) ./setup.py install --yes
$(PYTHON) ./setup.py install
ldconfig || true
build:
......
......@@ -15,13 +15,6 @@ try:
except NameError:
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
os.chdir(os.path.join(os.path.dirname(os.path.realpath(__file__)), "src"))
......@@ -41,24 +34,6 @@ def which(command):
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():
paths = []
......@@ -127,19 +102,6 @@ class CleanCommand(Command):
except Exception:
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 an older version of binwalk is currently installed, completely remove it to prevent conflicts
existing_binwalk_modules = find_binwalk_module_paths()
......
......@@ -26,12 +26,12 @@ class Plotter(Module):
kwargs={'axis' : 2, 'enabled' : True},
description='Project data points onto 3D cube walls only'),
Option(short='Z',
long='max-points',
long='points',
type=int,
kwargs={'max_points' : 0},
description='Set the maximum number of plotted data points'),
Option(short='V',
long='show-grids',
long='grids',
kwargs={'show_grids' : True},
description='Display the x-y-z grids in the resulting plot'),
]
......
......@@ -30,15 +30,15 @@ class Entropy(Module):
kwargs={'enabled' : True},
description='Calculate file entropy'),
Option(short='J',
long='save-plot',
long='save',
kwargs={'save_plot' : True},
description='Save plot as a PNG'),
Option(short='N',
long='no-plot',
long='plot',
kwargs={'do_plot' : False},
description='Do not generate an entropy plot graph'),
Option(short='Q',
long='no-legend',
long='legend',
kwargs={'show_legend' : False},
description='Omit the legend from the entropy plot graph'),
]
......
......@@ -52,7 +52,7 @@ class Extractor(Module):
kwargs={'matryoshka' : 0},
description='Limit matryoshka recursion depth (default: 8 levels deep)'),
Option(short='j',
long='max-size',
long='size',
type=int,
kwargs={'max_size' : 0},
description='Limit the size of each extracted file'),
......
......@@ -39,7 +39,7 @@ class General(Module):
kwargs={'swap_size' : 0},
description='Reverse every n bytes before scanning'),
Option(short='I',
long='show-invalid',
long='invalid',
kwargs={'show_invalid' : True},
description='Show results marked as invalid'),
Option(short='x',
......
......@@ -16,7 +16,7 @@ class Signature(Module):
kwargs={'enabled' : True, 'force_default_scan' : True},
description='Scan target file(s) for common file signatures'),
Option(short='R',
long='raw-bytes',
long='raw',
kwargs={'enabled' : True, 'raw_bytes' : ''},
type=str,
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