Skip to content

Commit 8e980a7

Browse files
Run extractor.py with sudo
Binwalk now requires to be run with root privileges if the `run-as` option is specified
1 parent 75441cd commit 8e980a7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fat.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,15 @@ def run_extractor(firm_name):
4242

4343
extractor_cmd = os.path.join(firmadyne_path, "sources/extractor/extractor.py")
4444
extractor_args = [
45+
"--",
46+
extractor_cmd,
4547
"-np",
4648
"-nk",
4749
firm_name,
4850
os.path.join(firmadyne_path, "images")
4951
]
50-
51-
child = pexpect.spawn(extractor_cmd, extractor_args, timeout=None)
52+
child = pexpect.spawn("sudo", extractor_args, timeout=None)
53+
child.sendline(sudo_pass)
5254
child.expect_exact("Tag: ")
5355
tag = child.readline().strip().decode("utf8")
5456
child.expect_exact(pexpect.EOF)

0 commit comments

Comments
 (0)