Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
binwalk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-gitdep
binwalk
Commits
9258050b
Commit
9258050b
authored
Jan 08, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated setup
parent
ef96a6fd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
14 deletions
+29
-14
setup.py
setup.py
+29
-14
hexdiff.py
src/binwalk/modules/hexdiff.py
+0
-0
No files found.
setup.py
View file @
9258050b
...
@@ -59,28 +59,25 @@ def warning(lines, terminate=True, prompt=True):
...
@@ -59,28 +59,25 @@ def warning(lines, terminate=True, prompt=True):
if
terminate
:
if
terminate
:
sys
.
exit
(
1
)
sys
.
exit
(
1
)
class
UninstallCommand
(
Command
):
def
find_binwalk_module_paths
():
description
=
"Uninstalls the Python module"
paths
=
[]
user_options
=
[]
def
initialize_options
(
self
):
try
:
import
binwalk
paths
=
binwalk
.
__path__
except
KeyboardInterrupt
as
e
:
raise
e
except
Exception
:
pass
pass
def
finalize_options
(
self
):
return
paths
pass
def
run
(
self
):
def
remove_binwalk_module
():
try
:
for
path
in
find_binwalk_module_paths
():
import
binwalk
for
path
in
binwalk
.
__path__
:
try
:
try
:
remove_tree
(
path
)
remove_tree
(
path
)
except
OSError
as
e
:
except
OSError
as
e
:
pass
pass
except
KeyboardInterrupt
as
e
:
raise
e
except
Exception
as
e
:
pass
script_path
=
which
(
MODULE_NAME
)
script_path
=
which
(
MODULE_NAME
)
if
script_path
:
if
script_path
:
...
@@ -92,6 +89,19 @@ class UninstallCommand(Command):
...
@@ -92,6 +89,19 @@ class UninstallCommand(Command):
except
Exception
as
e
:
except
Exception
as
e
:
pass
pass
class
UninstallCommand
(
Command
):
description
=
"Uninstalls the Python module"
user_options
=
[]
def
initialize_options
(
self
):
pass
def
finalize_options
(
self
):
pass
def
run
(
self
):
remove_binwalk_module
()
class
CleanCommand
(
Command
):
class
CleanCommand
(
Command
):
description
=
"Clean Python build directories"
description
=
"Clean Python build directories"
user_options
=
[]
user_options
=
[]
...
@@ -130,6 +140,11 @@ if "install" in sys.argv:
...
@@ -130,6 +140,11 @@ if "install" in sys.argv:
warning
(
msg
,
prompt
=
True
)
warning
(
msg
,
prompt
=
True
)
# If an older version of binwalk is currently installed, completely remove it to prevent conflicts
existing_binwalk_modules
=
find_binwalk_module_paths
()
if
existing_binwalk_modules
and
not
os
.
path
.
exists
(
os
.
path
.
join
(
existing_binwalk_modules
[
0
],
"core"
)):
remove_binwalk_module
()
# Re-build the magic file during a build/install
# Re-build the magic file during a build/install
if
"install"
in
sys
.
argv
or
"build"
in
sys
.
argv
:
if
"install"
in
sys
.
argv
or
"build"
in
sys
.
argv
:
# Generate a new magic file from the files in the magic directory
# Generate a new magic file from the files in the magic directory
...
...
src/binwalk/modules/hexdiff.py
View file @
9258050b
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment