Skip to content

Commit

Permalink
Run extractor.py with sudo
Browse files Browse the repository at this point in the history
Binwalk now requires to be run with root privileges if the `run-as` option is specified
  • Loading branch information
extremecoders-re authored Oct 17, 2021
1 parent 75441cd commit 8e980a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fat.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ def run_extractor(firm_name):

extractor_cmd = os.path.join(firmadyne_path, "sources/extractor/extractor.py")
extractor_args = [
"--",
extractor_cmd,
"-np",
"-nk",
firm_name,
os.path.join(firmadyne_path, "images")
]

child = pexpect.spawn(extractor_cmd, extractor_args, timeout=None)
child = pexpect.spawn("sudo", extractor_args, timeout=None)
child.sendline(sudo_pass)
child.expect_exact("Tag: ")
tag = child.readline().strip().decode("utf8")
child.expect_exact(pexpect.EOF)
Expand Down

0 comments on commit 8e980a7

Please sign in to comment.