GreyDGL / PentestGPT

A GPT-empowered penetration testing tool
MIT License
6.69k stars 798 forks source link

OpenAI API Key issue #113

Closed emilyanncr closed 1 year ago

emilyanncr commented 1 year ago

I exported my OpenAI API key according to the instructions but received the error that the OpenAI API Key is not properly configured. Nevertheless it did establish a connection. I ran pentestgpt --reasoning_model=gpt-3.5-turbo --useAPI as was suggested. The ChatGPT session initializes, but I'm not able to enter my target info before the program begins generating task information. I tried running this several times. Can someone please advise?

I'm running this on most updated version of Kali OS I installed the package according to the directions (pip3 install git+https://github.com/GreyDGL/PentestGP) I have a ChatGPT plus account

Aside from that, where can I find the config folder? Since I didn't run a 'git clone' of the repo before installing, I can't find any of the files. (If I ran git clone first, CD into that folder, and manually install install it, I would, I just don't know how to do that.)

image

Many thanks!!

GreyDGL commented 1 year ago

Users will not have access to GPT-4 unless applying for testing access. May I confirm if you have applied for GPT-4 before?

I never saw the second issue before. Please try not to press enter during the tool running process. May you help to reproduce the issue and share the detailed procedures (like what keys did you press, etc.)?

GreyDGL commented 1 year ago

For the current installation, it will be in the python executable folder. You may try with which pentestgpt to check the installation path.

RitchZoeSquad commented 1 year ago

The same issue happened to me when trying to export the key and try to run the code even if I have been approve for GPT 4

image
RitchZoeSquad commented 1 year ago

I will send you a video on loom

emilyanncr commented 1 year ago

Many thanks for the speedy reply! I specified I wanted to use 3.5 by running pentestgpt --reasoning_model=gpt-3.5-turbo --useAPI. I realized what I did wrong. When you get prompted about whether you wanted to continue from a session I was pressing n -enter-, when I shouldn't have pressed enter. I got it to work today and run properly. I found the executable by using which. I'm trying to find the other folders that go with the package, like the /config folder. Do you know where I could find that?

BTW amazing tool!! But can you maybe not go as far as creating an automated pentest solution. ;) I got a family to feed

GreyDGL commented 1 year ago

Thanks for the support @emilyanncr ! The config files are deprecated. They were only used in previous versions. We're far from building automated tools, but LLM-empowered solutions are amazing. Please leave feedback or any thoughts after using the tool.

GreyDGL commented 1 year ago

@RitchZoeSquad Did you run pentestgpt-connection before? What was the output?

RitchZoeSquad commented 1 year ago

Greetings yes I did I can send you another video. Can you try to spin up a free vps on oracle or google cloud to test it?

GreyDGL commented 1 year ago

Found the issue. Need to use "--useAPI" to enable API mode. I'll update it to use API by default in the latest commit.