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
3c250f13
Commit
3c250f13
authored
Jul 15, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made prefix module path the priority in sys.paths
parent
3af5636c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
binwalk
src/scripts/binwalk
+12
-13
No files found.
src/scripts/binwalk
View file @
3c250f13
#!/usr/bin/env python
#!/usr/bin/env python
import
os
import
sys
import
sys
from
threading
import
Thread
from
threading
import
Thread
try
:
# If installed to a custom prefix directory, binwalk may not be in
import
binwalk
# the default module search path(s). Try to resolve the prefix module
except
ImportError
:
# path and make it the first entry in sys.path.
# If installed to a custom prefix directory, binwalk may not be in
_module_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
)),
# the default module search path(s). Try to resolve the prefix module
"lib"
,
# path and add it to sys.path.
"python
%
d.
%
d"
%
(
sys
.
version_info
[
0
],
sys
.
version_info
[
1
]),
import
os
"site-packages"
)
module_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
)),
if
os
.
path
.
exists
(
_module_path
)
and
_module_path
not
in
sys
.
path
:
"lib"
,
sys
.
path
=
[
_module_path
]
+
sys
.
path
"python
%
d.
%
d"
%
(
sys
.
version_info
[
0
],
sys
.
version_info
[
1
]),
"site-packages"
)
import
binwalk
sys
.
path
.
append
(
module_path
)
import
binwalk
from
binwalk.core.compat
import
user_input
from
binwalk.core.compat
import
user_input
def
display_status
(
m
):
def
display_status
(
m
):
...
...
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