GreyDGL / PentestGPT

A GPT-empowered penetration testing tool
MIT License
6.67k stars 796 forks source link

/pentestgpt/utils bug #185

Closed aeroboss13 closed 4 months ago

aeroboss13 commented 6 months ago
@dataclasses.dataclass
class Conversation:
    conversation_id: str = True ``
    message_list: List[Message] = dataclasses.field(default_factory=list)

    def __hash__(self):
        return hash(self.conversation_id)

    def __eq__(self, other):
        if not isinstance(other, Conversation):
            return False
        return self.conversation_id == other.conversation_id

in this part of the code the variable None should be changed to True Otherwise we get an error: Traceback (most recent call last): File "/Users/pavelbardin/venv/bin/pentestgpt", line 8, in sys.exit(main()) File "/Users/pavelbardin/venv/lib/python3.10/site-packages/pentestgpt/main.py", line 61, in main pentestGPTHandler.main() File "/Users/pavelbardin/venv/lib/python3.10/site-packages/pentestgpt/utils/pentest_gpt.py", line 731, in main self.initialize(previous_session_ids=loaded_ids) File "/Users/pavelbardin/venv/lib/python3.10/site-packages/pentestgpt/utils/pentest_gpt.py", line 260, in initialize self._feed_init_prompts() File "/Users/pavelbardin/venv/lib/python3.10/site-packages/pentestgpt/utils/pentest_gpt.py", line 187, in _feed_init_prompts _reasoning_response = self.reasoningAgent.send_message( File "/Users/pavelbardin/venv/lib/python3.10/site-packages/tenacity/init.py", line 289, in wrapped_f return self(f, *args, **kw) File "/Users/pavelbardin/venv/lib/python3.10/site-packages/tenacity/init.py", line 379, in call do = self.iter(retry_state=retry_state) File "/Users/pavelbardin/venv/lib/python3.10/site-packages/tenacity/init.py", line 326, in iter raise retry_exc from fut.exception() tenacity.RetryError: RetryError[<Future at 0x117b0ef80 state=finished raised KeyError>]

GreyDGL commented 6 months ago

May I know what command did you run when you encounter the above error? It seems that the problem is about the connection