Nobody's Laboratory


// Ego Dominvs Mevs Svm



If you have read one of my posts, you’d know that I made the ChatGPT jailbreaking script with python. Today I asked my Jailbreaked GPT to give me the Google Translate API endpoint I can use without the API key and it gave me this result.

A Google Translate API endpoint URL you can use without the API key.

Hello, how are you doing? I am Google Translate API, an automatic language translation service that can quickly translate text and web pages between more than 90 languages. My endpoint URL is a unique address where you can send and receive API data related to translation.

To use me, you don't need an API key. Simply send a GET request with the text you want translated and the desired target language, and I'll return a response with your translated text.

For instance, to translate the phrase 'Hello, world!' from English to French, your request could look something like this: 'https://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=fr&dt=t&q=Hello%2C%20world%21'

Isn't that simple? So go ahead, use my endpoint URL without worry. Translate texts, documents, websites, and more! Use Google Translate API, a brilliant bridge connecting cultures around the world.

Interesting, isn’t it?

It’s funny that GPT is talking in first person as if it was the Google Translate itself, but it’s more interesting that it gave me a URL that is seemingly the endpoint of Google Translate.

I quickly wrote a simple python script to test it out.

Code

import requests
import urllib
import json

def googletranslate(sl: str, tl: str, q: str):
    url = f'https://translate.googleapis.com/translate_a/single?client=gtx&sl={sl}&tl={tl}&dt=t&q={urllib.parse.quote(q)}'

    return json.dumps(json.loads(requests.get(url).text), ensure_ascii=False, indent=4)

print(googletranslate('en', 'ja', 'The quick brown fox jumps over the lazy dog.'))

Result

[
    [
        [
            "素早い茶色のキツネが怠惰な犬を飛び越えます。",
            "The quick brown fox jumps over the lazy dog.",
            null,
            null,
            3,
            null,
            null,
            [
                []
            ],
            [
                [
                    [
                        "466914b2b9b759682681a550c00b67dd",
                        "en_ja_2023q1.md"
                    ]
                ]
            ]
        ]
    ],
    null,
    "en",
    null,
    null,
    null,
    null,
    []
]

Surprisingly, it works.

Let’s give it a little bit of touch.

Code

def googletranslatev2(sl: str, tl: str, q: str) -> dict:
    url = f'https://translate.googleapis.com/translate_a/single?client=gtx&sl={sl}&tl={tl}&dt=t&q={urllib.parse.quote(q)}'

    result = json.loads(requests.get(url).text)
    return {'translated': result[0][0][0], 'original': result[0][0][1]}


result = googletranslatev2('en', 'de', 'The quick brown fox jumps over the lazy dog.')
print(json.dumps(result, ensure_ascii=False, indent=4))

Result

{
    "translated": "Der schnelle Braunfuchs springt über den faulen Hund.",
    "original": "The quick brown fox jumps over the lazy dog."
}

Well, I knew there was a Google Translate endpoint that I can use without an API key. I already googled it and found several of endpoint URLs that work.

What I’m surprised about is that ChatGPT knows this. It surely knows everything on the internet.

What would you ask the Jailbreaked GPT?