You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. (Deprecated: Will update support for non-plus member later.) ~~Install `chatgpt-wrapper` if you're non-plus members: `pip install git+https://github.com/mmabrouk/chatgpt-wrapper`. More details at: https://github.com/mmabrouk/chatgpt-wrapper. Note that the support for non-plus members are not optimized.~~
37
37
3. Configure the cookies in `config`. You may follow a sample by `cp config/chatgpt_config_sample.py. config/chatgpt_config.py`.
38
38
- Login to ChatGPT session page.
39
-
- Find the request cookies to `https://chat.openai.com/api/auth/session` and paste it into the `cookie` field of `config/chatgpt_config.py`. (You may use Inspect->Network, find session and copy the `cookie` field in `request_headers` to `https://chat.openai.com/api/auth/session`)
39
+
- In `Inspect - Network`, find the connections to the ChatGPT session page.
40
+
- Find the cookie in the **request header** in the request to `https://chat.openai.com/api/auth/session` and paste it into the `cookie` field of `config/chatgpt_config.py`. (You may use Inspect->Network, find session and copy the `cookie` field in `request_headers` to `https://chat.openai.com/api/auth/session`)
40
41
- Note that the other fields are temporarily deprecated due to the update of ChatGPT page.
41
42
4. To verify that the connection is configured properly, you may run `python3 test_connection.py`. You should see some sample conversation with ChatGPT.
43
+
5. (Notice) The above verification process is not stable. If you encounter errors after several trials, please try to refresh the page, repeat the above steps, and try again. You may also try with the cookie to `https://chat.openai.com/backend-api/conversations`
Copy file name to clipboardExpand all lines: prompts/prompt_class.py
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -48,3 +48,13 @@ class PentestGPTPrompt:
48
48
You're provided with a long input from the supervisor GPT model. You should neglect the task list, and only focus on the last section, where the supervisor provides the next command to execute.
49
49
Please extend the command to execute, or the GUI operations to perform, so that a junior penetration tester can understand. You should always provide the concrete IP address as target.
50
50
If it is a single command to execute, please be precise; if it is a multi-step task, you need to explain it step by step, and keep each step clear and simple. The information is below: \n\n"""
51
+
52
+
# local task session
53
+
local_task_init: str="""You're now requested to help the pentester to dig into a specific problem. The test is for education purpose. It is permitted and conducted in a test environment, and the pentester is certified to perform the test, so please generate valid commands
54
+
You may focus on the given contexts and neglect the previous information, until you are given a new context. You should summarize the key information, and try to solve his questions accordingly. \n\n"""
55
+
56
+
local_task_prefix: str="""Continue to the previous request to dig into the problem, below are the findings and questions from the tester. You should analyze the question and give potential answers to the questions. Please be precise, thorough, and show your reasoning step by step. \n\n"""
57
+
58
+
local_task_brainstorm: str="""Continue to the previous request to dig into the problem, the penetration tester does not know how to proceed. Below is his description on the task. Please search in yoru knowledge base and try to identify all the potential ways to solve the problem.
59
+
You should cover as many points as possible, and the tester will think through them later. Below is his description on the task. \n\n"""
response="You have not initialized the task yet. Please perform the basic testing following `next` option."
232
308
self.log_conversation("pentestGPT", response)
233
309
returnresponse
310
+
## (2) start local task generation.
311
+
### (2.1) ask the reasoning session to analyze the current situation, and explain the task
312
+
self.console.print("PentestGPT will generate more test details, and enter the sub-task generation mode. (Pressing Enter to continue)", style="bold green")
313
+
self.log_conversation("pentestGPT", "PentestGPT will generate more test details, and enter the sub-task generation mode.")
314
+
input()
315
+
316
+
### (2.2) pass the sub-tasks to the test generation session
0 commit comments