Describe the bug
When i end my input with shift + right-arrow, pentestgpt gave me error. I use macos Sonoma 14.5 and latest pentestgpt version
pentestgpt --reasoning_model=gpt-4
Your CHATGPT_COOKIE is not set. Please set it in the environment variable.
Your GOOGLE_API_KEY is not set. Please set it in the environment variable.
Your GOOGLE_API_KEY is not set. Please set it in the environment variable.
Welcome to pentestGPT, an automated penetration testing parser empowered by GPT.
The settings are:
parsing model: gpt-4o-2024-05-13
reasoning model: gpt-4
use API: True
log directory: logs
Do you want to continue from previous session? (y/n) n
New conversation.3bffd88a-2285-11ef-9583-8ecc7cb9e95f is created.
New conversation.3c9ae05a-2285-11ef-9583-8ecc7cb9e95f is created.
ChatGPT Sessions Initialized.
Please describe the penetration testing task in one line, including the target IP, task type, etc.
i want to pentest test.com
PentestGPT output:
Reconnaissance -
1.1 Passive Information Gathering - (completed)
1.2 Active Information Gathering - (completed)
1.3 Identify Open Ports and Services - (to-do)
1.3.1 Perform a full port scan on test.com - (to-do)
1.3.2 Determine the purpose of each open port - (to-do)
From the provided Penetration Testing Tree (PTT), it's clear that the next task to be executed is 1.3.1 'Perform a full port scan on test.com'. Here are the detailed steps to perform this task:
Step 1: Open your terminal.
Step 2: Use Nmap, a free and open-source network scanner, for the port scanning. If it's not installed, you can install it using the following command on Ubuntu:
sudo apt-get install nmap
Step 3: Once Nmap is installed, you can use it to perform a full port scan on test.com by typing the following command into your terminal:
nmap -p- test.com
This command will scan all 65535 ports on test.com.
Step 4: Review the output. The open ports will be listed in the command line output.
Remember, the purpose of this task is to identify all open ports on test.com, which will help us understand the network better and plan further penetration testing steps.
next
Please choose the source of the information.
() tool Paste the output of the security test tool used ^
( ) user-comments
( ) web Paste the relevant content of a web page
( ) default Write whatever you want, the tool will handle it v
Your input: (End with <shift + right-arrow>)
nmap scan only show port 80 and 443
Exception: RetryError[<Future at 0x10698f050 state=finished raised KeyError>]
Exception details are below. You may submit an issue on github and paste the error trace
Traceback (most recent call last):
File "/Users/myuser/Work/venvpentest/lib/python3.12/site-packages/tenacity/init.py", line 470, in call
result = fn(args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/Users/myuser/Work/Tools/PentestGPT/pentestgpt/utils/llm_api.py", line 268, in send_message
conversation = self.conversation_dict[conversation_id]
KeyError: None
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/myuser/Work/Tools/PentestGPT/pentestgpt/utils/pentest_gpt.py", line 742, in main
result = self.input_handler()
^^^^^^^^^^^^^^^^^^^^
File "/Users/myuser/Work/Tools/PentestGPT/pentestgpt/utils/pentest_gpt.py", line 471, in input_handler
parsed_input = self.input_parsing_handler(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/myuser/Work/Tools/PentestGPT/pentestgpt/utils/pentest_gpt.py", line 312, in input_parsing_handler
summarized_content += self.parsingAgent.send_message(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/myuser/Work/venvpentest/lib/python3.12/site-packages/tenacity/init.py", line 330, in wrapped_f
return self(f, *args, **kw)
^^^^^^^^^^^^^^^^^^^^
File "/Users/myuser/Work/venvpentest/lib/python3.12/site-packages/tenacity/init.py", line 467, in call
do = self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/myuser/Work/venvpentest/lib/python3.12/site-packages/tenacity/init.py", line 368, in iter
result = action(retry_state)
^^^^^^^^^^^^^^^^^^^
File "/Users/myuser/Work/venvpentest/lib/python3.12/site-packages/tenacity/init.py", line 411, in exc_check
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x10698f050 state=finished raised KeyError>]
Before you quit, you may want to save the current session.
Please enter the name of the current session. (Default with current timestamp)
Describe the bug When i end my input with shift + right-arrow, pentestgpt gave me error. I use macos Sonoma 14.5 and latest pentestgpt version
pentestgpt --reasoning_model=gpt-4 Your CHATGPT_COOKIE is not set. Please set it in the environment variable. Your GOOGLE_API_KEY is not set. Please set it in the environment variable. Your GOOGLE_API_KEY is not set. Please set it in the environment variable. Welcome to pentestGPT, an automated penetration testing parser empowered by GPT. The settings are:
New conversation.3c9ae05a-2285-11ef-9583-8ecc7cb9e95f is created.
Step 1: Open your terminal.
Step 2: Use Nmap, a free and open-source network scanner, for the port scanning. If it's not installed, you can install it using the following command on Ubuntu:
Step 3: Once Nmap is installed, you can use it to perform a full port scan on test.com by typing the following command into your terminal:
This command will scan all 65535 ports on test.com.
Step 4: Review the output. The open ports will be listed in the command line output.
Remember, the purpose of this task is to identify all open ports on test.com, which will help us understand the network better and plan further penetration testing steps.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/Users/myuser/Work/Tools/PentestGPT/pentestgpt/utils/pentest_gpt.py", line 742, in main result = self.input_handler() ^^^^^^^^^^^^^^^^^^^^ File "/Users/myuser/Work/Tools/PentestGPT/pentestgpt/utils/pentest_gpt.py", line 471, in input_handler parsed_input = self.input_parsing_handler( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/myuser/Work/Tools/PentestGPT/pentestgpt/utils/pentest_gpt.py", line 312, in input_parsing_handler summarized_content += self.parsingAgent.send_message( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/myuser/Work/venvpentest/lib/python3.12/site-packages/tenacity/init.py", line 330, in wrapped_f return self(f, *args, **kw) ^^^^^^^^^^^^^^^^^^^^ File "/Users/myuser/Work/venvpentest/lib/python3.12/site-packages/tenacity/init.py", line 467, in call do = self.iter(retry_state=retry_state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/myuser/Work/venvpentest/lib/python3.12/site-packages/tenacity/init.py", line 368, in iter result = action(retry_state) ^^^^^^^^^^^^^^^^^^^ File "/Users/myuser/Work/venvpentest/lib/python3.12/site-packages/tenacity/init.py", line 411, in exc_check raise retry_exc from fut.exception() tenacity.RetryError: RetryError[<Future at 0x10698f050 state=finished raised KeyError>]
Before you quit, you may want to save the current session. Please enter the name of the current session. (Default with current timestamp)