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
e4a5254d
Commit
e4a5254d
authored
Nov 17, 2013
by
heffnercj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extraction now works in python3
parent
e3d190b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
extractor.py
src/binwalk/extractor.py
+1
-1
lzmamod.py
src/binwalk/plugins/lzmamod.py
+5
-2
No files found.
src/binwalk/extractor.py
View file @
e4a5254d
...
@@ -441,7 +441,7 @@ class Extractor:
...
@@ -441,7 +441,7 @@ class Extractor:
while
total_size
<
size
:
while
total_size
<
size
:
(
data
,
dlen
)
=
fdin
.
read_block
()
(
data
,
dlen
)
=
fdin
.
read_block
()
fdout
.
write
(
data
[:
dlen
]
)
fdout
.
write
(
str2bytes
(
data
[:
dlen
])
)
total_size
+=
dlen
total_size
+=
dlen
# Cleanup
# Cleanup
...
...
src/binwalk/plugins/lzmamod.py
View file @
e4a5254d
import
os
import
os
import
shutil
import
shutil
from
binwalk.compat
import
*
from
binwalk.common
import
BlockFile
from
binwalk.common
import
BlockFile
class
Plugin
:
class
Plugin
:
...
@@ -39,9 +40,11 @@ class Plugin:
...
@@ -39,9 +40,11 @@ class Plugin:
(
data
,
dlen
)
=
fp_in
.
read_block
()
(
data
,
dlen
)
=
fp_in
.
read_block
()
if
i
==
0
:
if
i
==
0
:
fp_out
.
write
(
data
[
0
:
5
]
+
self
.
FAKE_LZMA_SIZE
+
data
[
5
:])
out_data
=
data
[
0
:
5
]
+
self
.
FAKE_LZMA_SIZE
+
data
[
5
:]
else
:
else
:
fp_out
.
write
(
data
)
out_data
=
data
fp_out
.
write
(
str2bytes
(
out_data
))
i
+=
dlen
i
+=
dlen
...
...
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