美文网首页
ubuntu20.04 使用firmadyne 的一个小问题

ubuntu20.04 使用firmadyne 的一个小问题

作者: liugensite | 来源:发表于2021-05-13 00:11 被阅读0次

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 166, in read_nonblocking s = os.read(self.child_fd, size) OSError: [Errno 5] Input/output error During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 111, in expect_loop incoming = spawn.read_nonblocking(spawn.maxread, timeout) File "/usr/lib/python3/dist-packages/pexpect/pty_spawn.py", line 485, in read_nonblocking return super(spawn, self).read_nonblocking(size) File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 171, in read_nonblocking raise EOF('End Of File (EOF). Exception style platform.') pexpect.exceptions.EOF: End Of File (EOF). Exception style platform. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "./fat.py", line 170, in <module> main() File "./fat.py", line 165, in main infer_network(arch, image_id, qemu_dir) File "./fat.py", line 111, in infer_network child.expect_exact("Interfaces:", timeout=None) File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 418, in expect_exact return exp.expect_loop(timeout) File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 117, in expect_loop return self.eof(e) File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 63, in eof raise EOF(msg) pexpect.exceptions.EOF: End Of File (EOF). Exception style platform. <pexpect.pty_spawn.spawn object at 0x7fe4f29beb20> command: /home/re/firmware-analysis-toolkit/firmadyne/scripts/inferNetwork.sh

在使用./fat.py出现上述问题

解决方法:将./firmadyne/scripts/makeImage.sh 文件中的第63行

TARBALL_SIZE=$(tar ztvf "${TARBALL_DIR}/${IID}.tar.gz" --totals 2>&1 |tail -1|cut -f4 -d' ')

修改为如下

TARBALL_SIZE=$(tar ztvf "${TARBALL_DIR}/${IID}.tar.gz" --totals 2>&1 |tail -1|cut -f2 -d':'|cut -f2 -d' ')

相关文章

网友评论

      本文标题:ubuntu20.04 使用firmadyne 的一个小问题

      本文链接:https://www.haomeiwen.com/subject/abzzdltx.html