Skip to content

Fix process() with executable relative to cwd #1751

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

Merged
merged 6 commits into from
Apr 29, 2021

Conversation

mephi42
Copy link
Contributor

@mephi42 mephi42 commented Dec 23, 2020

Currently process('./baz', cwd='foo/bar'), even when foo/bar/baz exists, throws an unhelpful pwnlib.exception.PwnlibException: None does not exist. Fix by adding a special case to _validate().

Testing

Added a new doctest to pwnlib/tubes/process.py.

Target Branch

dev

Changelog

Updated.

@mephi42 mephi42 changed the title Executable relative to cwd Fix process() with executable relative to cwd Dec 23, 2020
@Arusekk
Copy link
Member

Arusekk commented Dec 23, 2020

Please add a doctest that ensures this works with absolute paths too. Great stuff, thanks!

@mephi42 mephi42 force-pushed the executable-relative-to-cwd branch from 3fb9b4e to a820d85 Compare December 23, 2020 22:41
@mephi42
Copy link
Contributor Author

mephi42 commented Dec 23, 2020

Thanks for reviewing :-) Not sure, which exact combination you had in mind, so I added 3 more that I could think of.

@mephi42 mephi42 force-pushed the executable-relative-to-cwd branch from a820d85 to 4b99a1f Compare December 23, 2020 22:43
@Arusekk
Copy link
Member

Arusekk commented Dec 23, 2020

The tests have mysterious failures again. This is really unnerving of whatever on earth is causing this. Not your fault I hope :)

EDIT: Aaaah, this is us wgetting some elderly gdbserver from Ubuntu's ftp (why the heck?). Yeah, the tests won't probably auto-run until someone fixes that.

@Arusekk Arusekk merged commit e272094 into Gallopsled:dev Apr 29, 2021
@mephi42 mephi42 deleted the executable-relative-to-cwd branch May 17, 2024 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants