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

the result of target remote match is wrong when we attach gdb with "gdb.attach(('0.0.0.0',1234))" #2290

Open
ckxckx opened this issue Oct 31, 2023 · 2 comments · May be fixed by #2291
Open

Comments

@ckxckx
Copy link

ckxckx commented Oct 31, 2023

when use gdb.attach(('0.0.0.0',1234)),
failed to find the correct pid for local process

 if not (raddrs & remote):  # maybe here is a bug, edit it to " laddrs & remote"
    return False
if local is None:
    return True
return bool(laddrs & local)

image
image

@Arusekk
Copy link
Member

Arusekk commented Oct 31, 2023 via email

@ckxckx
Copy link
Author

ckxckx commented Oct 31, 2023

Here is the testcase:
testcase.zip

Test with make testpwn:

before the patch, testpwntool.py will fail like below:
image

Setting

python version :

(v310) @root➜  pwntools git:(dev) python3 --version
Python 3.10.12

pwntools version: build from the latest code which is clone from https://github.com/Gallopsled/pwntools

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