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-depend
binwalk
Commits
464a7d8c
Commit
464a7d8c
authored
Jan 08, 2014
by
devttys0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed lzamod.py bug
parent
827f3e7d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
extractor.py
src/binwalk/modules/extractor.py
+3
-3
lzmamod.py
src/binwalk/plugins/lzmamod.py
+1
-1
No files found.
src/binwalk/modules/extractor.py
View file @
464a7d8c
...
@@ -538,7 +538,7 @@ class Extractor(Module):
...
@@ -538,7 +538,7 @@ class Extractor(Module):
except
KeyboardInterrupt
as
e
:
except
KeyboardInterrupt
as
e
:
raise
e
raise
e
except
Exception
as
e
:
except
Exception
as
e
:
sys
.
stderr
.
write
(
"WARNING: Extractor.execute failed to run '
%
s':
%
s
\n
"
%
(
str
(
cmd
),
str
(
e
)))
sys
.
stderr
.
write
(
"WARNING: Extractor.execute failed to run
internal extractor
'
%
s':
%
s
\n
"
%
(
str
(
cmd
),
str
(
e
)))
else
:
else
:
# If not in verbose mode, create a temporary file to redirect stdout and stderr to
# If not in verbose mode, create a temporary file to redirect stdout and stderr to
if
not
self
.
config
.
verbose
:
if
not
self
.
config
.
verbose
:
...
@@ -556,8 +556,8 @@ class Extractor(Module):
...
@@ -556,8 +556,8 @@ class Extractor(Module):
# Silently ignore no such file or directory errors. Why? Because these will inevitably be raised when
# Silently ignore no such file or directory errors. Why? Because these will inevitably be raised when
# making the switch to the new firmware mod kit directory structure. We handle this elsewhere, but it's
# making the switch to the new firmware mod kit directory structure. We handle this elsewhere, but it's
# annoying to see this spammed out to the console every time.
# annoying to see this spammed out to the console every time.
if
e
.
errno
!=
2
:
if
not
hasattr
(
e
,
'errno'
)
or
e
.
errno
!=
2
:
sys
.
stderr
.
write
(
"WARNING: Extractor.execute failed to run '
%
s':
%
s
\n
"
%
(
str
(
cmd
),
str
(
e
)))
sys
.
stderr
.
write
(
"WARNING: Extractor.execute failed to run
external extrator
'
%
s':
%
s
\n
"
%
(
str
(
cmd
),
str
(
e
)))
retval
=
False
retval
=
False
if
tmp
is
not
None
:
if
tmp
is
not
None
:
...
...
src/binwalk/plugins/lzmamod.py
View file @
464a7d8c
...
@@ -20,7 +20,7 @@ class LZMAModPlugin(binwalk.core.plugin.Plugin):
...
@@ -20,7 +20,7 @@ class LZMAModPlugin(binwalk.core.plugin.Plugin):
# Replace the existing LZMA extraction command with our own
# Replace the existing LZMA extraction command with our own
rules
=
self
.
module
.
extractor
.
get_rules
()
rules
=
self
.
module
.
extractor
.
get_rules
()
for
i
in
range
(
0
,
len
(
rules
)):
for
i
in
range
(
0
,
len
(
rules
)):
if
rules
[
i
][
'regex'
]
.
match
(
self
.
SIGNATURE
):
if
rules
[
i
][
'regex'
]
.
match
(
self
.
SIGNATURE
)
and
rules
[
i
][
'cmd'
]
:
self
.
original_cmd
=
rules
[
i
][
'cmd'
]
self
.
original_cmd
=
rules
[
i
][
'cmd'
]
rules
[
i
][
'cmd'
]
=
self
.
lzma_cable_extractor
rules
[
i
][
'cmd'
]
=
self
.
lzma_cable_extractor
break
break
...
...
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