GreyDGL / PentestGPT

A GPT-empowered penetration testing tool
MIT License
7k stars 840 forks source link

Free api #90

Closed Kolhax closed 1 year ago

Kolhax commented 1 year ago

Hi my name is Kepar, recently i found a chatgpt clone (3.5 turbo) model for free

i leave the code here, tell me if something happens with this, hope i helped the world

import json
import requests

safeInput = input('Request:  ')

# Prepare the data payload
data = {
    "prompt": safeInput
}
payload = json.dumps(data)

# Set the headers
headers = {
    "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0",
    "Accept": "application/json, text/plain, */*",
    "Accept-Language": "en-US,en;q=0.5",
    "Content-Type": "application/json",
    "Origin": "https://chatbot.theb.ai",
    "Referer": "https://chatbot.theb.ai/"
}

# Send the POST request
url = "https://chatbot.theb.ai/api/chat-process"
response = requests.post(url, data=payload, headers=headers)

# Process the response
if response.status_code == 200:
    response_text = response.text

    # Find the last JSON string in the response text
    json_strings = response_text.strip().split('\n')
    last_json_string = json_strings[-1]

    response_json = json.loads(last_json_string)
    print(response_json['text'])
else:
    print("Error:", response.status_code)
GreyDGL commented 1 year ago

Interesting. Do you have more information about this BAI Chat company? What I noticed are:

  1. they provide quite an amount of free tokens for chat services.
  2. They seem to be using OpenAI API, but with some custom hidden prompts.
  3. The performance is similar to GPT3.5.

If they can provide stable and consistent service, I'm happy to add this module in.

Kolhax commented 1 year ago

Interesting. Do you have more information about this BAI Chat company? What I noticed are:

  1. they provide quite an amount of free tokens for chat services.
  2. They seem to be using OpenAI API, but with some custom hidden prompts.
  3. The performance is similar to GPT3.5.

If they can provide stable and consistent service, I'm happy to add this module in.

i saw it first time in https://github.com/aandrew-me/tgpt so i used it in pyhon and i saw the whole site: https://theb.ai/

GreyDGL commented 1 year ago

Cool. I'll implement a parser that allows users to integrate any model with some API structure, as discussed in #69. Then people can use their own APIs directly. Feel free to contribute to the repo (and you may want to join the discord if you have more ideas). I'll close this issue for now. Again, thanks for the information!

Kolhax commented 1 year ago

could u send me the discord

GreyDGL commented 1 year ago

Yes sure! https://discord.gg/eC34CEfEkK