Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #681 #693

Merged
merged 1 commit into from
Dec 9, 2019
Merged

Fix #681 #693

merged 1 commit into from
Dec 9, 2019

Conversation

Jinmo
Copy link
Contributor

@Jinmo Jinmo commented Dec 6, 2019

No description provided.

@@ -33,7 +33,7 @@ def get_file(path, recurse=1):
local_path = path

if pwndbg.qemu.root() and recurse:
return get(os.path.join(pwndbg.qemu.binfmt_root, path), 0)
return os.path.join(pwndbg.qemu.binfmt_root, path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it turns out that instead of returning local path we could have returned bytes read from the file.

Uh...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw shouldn't have the the if order reversed, i.e. first check for remote and then for pwndbg.qemu.root()?

Also, what is the situation when pwndbg.qemu.root() is used? I have qemu user on my system but I don't have the /etc/qemu-binfmt it tries to check :S.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's arbitrarily set by debian version of qemu as the default value of QEMU_LD_PREFIX. qemu-arm-static --help is showing it.

~/qemu-2.11+dfsg $ grep -r interp-prefix
debian/rules:   --interp-prefix=/etc/qemu-binfmt/%M \
...

@disconnect3d disconnect3d merged commit 5f40345 into pwndbg:dev Dec 9, 2019
@disconnect3d
Copy link
Member

Even though I asked a question I think this fix is valid. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants