PentestGPT
PentestGPT copied to clipboard
Unable to use <SHIFT + right arrow> Feature
I am currently attempting to run PentestGPT in Kali Linux. However, I seem to be encountering issues with the <Shift + Right Arrow> feature, which is used to select an item and move to the next line. I am stuck at the input section below and cannot select anything to enter my input. This is preventing me from proceeding to the next step as the <Shift + Right Arrow> function does not seem to be working.
Thanks for reporting this. I'll try to reproduce the issue and see if there's any solution.
Same issue here. Running Terminal on macOS Big Sur (11.7.6). Using ZSH (which I suspect to be the issue). If I find a solution/fix, will post it here.
Edit: Works after switching from zsh to Bash (/bin/bash).
@topscoder Interesting. I'm using the same environment as you. For me, the current key combination works. Anyway I'll try to reproduce this issue on Kali first and see how to resolve it.
Maybe it's Oh My Zsh in my case. I'm using it and it seems its overriding some keybindings.
Seem to run into the same issue for both bash and zsh for kali. I am currently using Kali (2023.1)
Same issue here, tried both mac os x and kali, tried zsh and bash. No luck.
Same issue bash env, kali wonder if its keyboard env.
same issue, vmware kali zsh, wsl kali too
I reproduced the issue in Kali. Will develop a fix. Meanwhile I cannot reproduce the issue on MacOS. If someone encounter the same issue, please ping me with your system setting.
The shift + arrow keys don't appear to be passed to kali when using vmware+macos+kali This can be tested by running od -i in the terminal and then hitting the keyboard shortcut
I changed lines 39 and 74 on my utils/prompt_select.py file from 's-right' to 'right' and it works just fine (then just use right-arrow, not shift + right-arrow)
you can see what the python prompt toolkit maps these to here - https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/src/prompt_toolkit/input/ansi_escape_sequences.py
EDIT: Additionally, a list of of keyboard shortcuts mapped to how to write them in code for prompt toolkit (e.g c-a for ctrl+a) is shown here - https://python-prompt-toolkit.readthedocs.io/en/master/pages/advanced_topics/key_bindings.html#list-of-special-keys
Thanks @jtothef ! I use a two-key binding because I don't want to arbitrarily trigger to enter. This seems to be valid solution. I'll develop a key binding conf so that people can set it freely.
Edit: one issue might be that users may want to use arrow keys to move the cursor and modify the typed contents. A configurable key-binding would be better.
The shift + arrow keys don't appear to be passed to kali when using vmware+macos+kali This can be tested by running od -i in the terminal and then hitting the keyboard shortcut
I changed lines 39 and 74 on my utils/prompt_select.py file from 's-right' to 'right' and it works just fine (then just use right-arrow, not shift + right-arrow)
you can see what the python prompt toolkit maps these to here - https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/src/prompt_toolkit/input/ansi_escape_sequences.py
Solution tested in Kali,Hyper-V works perfectly.
Running into the same issue running Kali (Purple 2023.3) in MacOS Monterey 12.6.7 Can somebody provide step by step remediation? Thank you
I also faced this problem on Kali, maybe it will be useful for someone:
- You need to find the file "prompt_select.py" in the installation directory PentestGPT. In my case it is - "/home/user/PentestGPT/PentestGPT/pentestgpt/utils/prompt_select.py".
- Edit the values in this file 's-right', if it is replaced by a value 'right then the selection of the menu item will be activated when is pressed the button "->".
The easiest fix for this issue is to use tmux
in Kali Linux, as mentioned in the latest version of documentation. Instead of using the native terminal, you may type tmux
to enter a tmux terminal, and everything will be working as expected.