Commit e4a5254d by heffnercj

Extraction now works in python3

parent e3d190b1
......@@ -441,7 +441,7 @@ class Extractor:
while total_size < size:
(data, dlen) = fdin.read_block()
fdout.write(data[:dlen])
fdout.write(str2bytes(data[:dlen]))
total_size += dlen
# Cleanup
......
import os
import shutil
from binwalk.compat import *
from binwalk.common import BlockFile
class Plugin:
......@@ -39,9 +40,11 @@ class Plugin:
(data, dlen) = fp_in.read_block()
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:
fp_out.write(data)
out_data = data
fp_out.write(str2bytes(out_data))
i += dlen
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment