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

Lookup using $PATHEXT file extensions in which on Windows #2328

Merged
merged 4 commits into from Jan 17, 2024

Conversation

peace-maker
Copy link
Member

Windows uses some file extensions to determine which file to run when given a non-existing file. Try all file extensions in the $PATHEXT environment variable, which defaults to .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL on Windows 11.

This allows to run process("calc") instead of process("calc.exe").

Windows uses some file extensions to determine which file to run when given
a non-existing file.

This allows to run `calc` instead of `calc.exe`.
pwnlib/tubes/process.py Outdated Show resolved Hide resolved
@peace-maker peace-maker changed the title Lookup process executable using $PATHEXT file extensions Lookup using $PATHEXT file extensions in which on Windows Jan 17, 2024
@peace-maker peace-maker merged commit d427844 into Gallopsled:dev Jan 17, 2024
12 of 13 checks passed
@peace-maker peace-maker deleted the which_pathext branch January 17, 2024 23:57
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.

None yet

2 participants