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

Unsupported Operating system: Windows #103

Open
ISuckAtGames2 opened this issue May 30, 2023 · 2 comments
Open

Unsupported Operating system: Windows #103

ISuckAtGames2 opened this issue May 30, 2023 · 2 comments

Comments

@ISuckAtGames2
Copy link

Downloaded PentestGPT on Windows, running the new pentestgpt-cookie command from the latest version produces this response

Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\ethan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts\pentestgpt-cookie.exe_main
.py", line 7, in
File "C:\Users\ethan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pentestgpt\extract_cookie.py", line 26, in main
raise Exception("Unsupported operating system: " + os_name)
Exception: Unsupported operating system: Windows

PentestGPT functioned fine until this most recent update.

@ISuckAtGames2
Copy link
Author

image

@vmayoral
Copy link
Collaborator

vmayoral commented May 30, 2023

That's right, recent changes structuring the tool as Python module (i.e. introduce pentestgpt-cookie) don't consider Windows. See https://github.com/GreyDGL/PentestGPT/blob/main/pentestgpt/extract_cookie.py#L19-L24. Feel free to contribute a default patch in here if you're a user of such an OS and wish to have it supported. It's a small patch/change that requires you to contribute the default path in Windows.

Alternatively, if you don't wish to contribute but just use it, you can just define the env. variable BROWSER_COOKIE_DB (see here) which will modify the default behavior and look into that path for Chrome's Cookies. We implemented this to support other OSs we're not using for development, such as Windows.

Some additional modifications might be needed elsewhere. Try this out and report back if this address your issue.

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

No branches or pull requests

2 participants