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
007012ef
Commit
007012ef
authored
Jul 01, 2017
by
Craig Heffner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated CPIO jump directive to include the CPIO entry header
parent
577a89b3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
cpio.py
src/binwalk/plugins/cpio.py
+4
-4
No files found.
src/binwalk/plugins/cpio.py
View file @
007012ef
...
@@ -11,6 +11,7 @@ class CPIOPlugin(binwalk.core.plugin.Plugin):
...
@@ -11,6 +11,7 @@ class CPIOPlugin(binwalk.core.plugin.Plugin):
cpio utility since no output directory can be provided to it directly.
cpio utility since no output directory can be provided to it directly.
'''
'''
CPIO_OUT_DIR
=
"cpio-root"
CPIO_OUT_DIR
=
"cpio-root"
CPIO_HEADER_SIZE
=
76
MODULES
=
[
'Signature'
]
MODULES
=
[
'Signature'
]
...
@@ -97,13 +98,12 @@ class CPIOPlugin(binwalk.core.plugin.Plugin):
...
@@ -97,13 +98,12 @@ class CPIOPlugin(binwalk.core.plugin.Plugin):
file_name
=
self
.
_get_file_name
(
result
.
description
)
file_name
=
self
.
_get_file_name
(
result
.
description
)
file_name_length
=
self
.
_get_file_name_length
(
result
.
description
)
file_name_length
=
self
.
_get_file_name_length
(
result
.
description
)
# The +1 is to
account for string lengths that
include the terminating NULL byte
# The +1 is to include the terminating NULL byte
if
file_name_length
not
in
[
len
(
file_name
),
len
(
file_name
)
+
1
]
:
if
file_name_length
!=
len
(
file_name
)
+
1
:
result
.
valid
=
False
result
.
valid
=
False
return
return
else
:
result
.
jump
=
file_size
+
file_name_length
result
.
jump
=
self
.
CPIO_HEADER_SIZE
+
file_size
+
file_name_length
self
.
consecutive_hits
+=
1
self
.
consecutive_hits
+=
1
if
not
self
.
found_archive
or
self
.
found_archive_in_file
!=
result
.
file
.
name
:
if
not
self
.
found_archive
or
self
.
found_archive_in_file
!=
result
.
file
.
name
:
...
...
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