Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2captcha is down too ,any other captcha server can be used?(to pass hcaptcha) #211

Open
yuyu12345-web123 opened this issue Dec 4, 2024 · 10 comments

Comments

@yuyu12345-web123
Copy link

Here are the services I tried and failed:
1、deathbycaptcha
2、captchas.io

@yuyu12345-web123
Copy link
Author

3、CapSolver

@johbs
Copy link

johbs commented Dec 4, 2024

What kind of validation are you using? Token ou Image? Please, share your code with us.

@adittyasharma
Copy link

adittyasharma commented Dec 4, 2024

Using 2captcha worked at first, but after a few attempts, Suno still somehow detects and flags the song with lyrics like "This is a fake app" and shit. 😭

import asyncio
import urllib.parse
import time
import aiohttp, os

# Your 2Captcha API key
two_captcha_api_key = os.getenv("TWO_CAPTCHA_API_KEY")

# The hCaptcha sitekey and page URL
sitekey = "d65453de-3f1a-4aac-9366-a0f06e52b2ce"
pageurl = "https://suno.com/create"


async def solve_hcaptcha(session):
    # Send hCaptcha to 2Captcha
    solve_url = f"http://2captcha.com/in.php?key={two_captcha_api_key}&method=hcaptcha&sitekey={sitekey}&pageurl={urllib.parse.quote(pageurl)}"

    async with session.request(method="GET", url=solve_url) as response:
        request_data = await response.text()

    if "OK" in request_data:
        captcha_id = request_data.split("|")[1]
    else:
        return None

    # Wait for the solution
    solved = False
    solution_token = None
    while not solved:
        time.sleep(5)  # Wait 5 seconds
        result_url = f"http://2captcha.com/res.php?key={two_captcha_api_key}&action=get&id={captcha_id}"

        async with session.request(method="GET", url=result_url) as result_response:
            result_data = await result_response.text()

        if "CAPCHA_NOT_READY" in result_data:
            # print("Captcha is still being solved")
            pass
        elif "OK" in result_data:
            solved = True
            solution_token = result_data.split("|")[1]
        else:
            return None

    return solution_token


if __name__ == "__main__":

    async def main():
        async with aiohttp.ClientSession() as session:
            return await solve_hcaptcha(session)

    print(asyncio.run(main()))

@yuyu12345-web123
Copy link
Author

suno use hcaptcha ,In recent days, almost all verification code services have closed the hcaptcha verification service, so it will fail.

Using 2captcha worked at first, but after a few attempts, Suno still somehow detects and flags the song with lyrics like "This is a fake app" and shit. 😭

import asyncio
import urllib.parse
import time
import aiohttp, os

# Your 2Captcha API key
two_captcha_api_key = os.getenv("TWO_CAPTCHA_API_KEY")

# The hCaptcha sitekey and page URL
sitekey = "d65453de-3f1a-4aac-9366-a0f06e52b2ce"
pageurl = "https://suno.com/create"


async def solve_hcaptcha(session):
    # Send hCaptcha to 2Captcha
    solve_url = f"http://2captcha.com/in.php?key={two_captcha_api_key}&method=hcaptcha&sitekey={sitekey}&pageurl={urllib.parse.quote(pageurl)}"

    async with session.request(method="GET", url=solve_url) as response:
        request_data = await response.text()

    if "OK" in request_data:
        captcha_id = request_data.split("|")[1]
    else:
        return None

    # Wait for the solution
    solved = False
    solution_token = None
    while not solved:
        time.sleep(5)  # Wait 5 seconds
        result_url = f"http://2captcha.com/res.php?key={two_captcha_api_key}&action=get&id={captcha_id}"

        async with session.request(method="GET", url=result_url) as result_response:
            result_data = await result_response.text()

        if "CAPCHA_NOT_READY" in result_data:
            # print("Captcha is still being solved")
            pass
        elif "OK" in result_data:
            solved = True
            solution_token = result_data.split("|")[1]
        else:
            return None

    return solution_token


if __name__ == "__main__":

    async def main():
        async with aiohttp.ClientSession() as session:
            return await solve_hcaptcha(session)

    print(asyncio.run(main()))

@adittyasharma
Copy link

@yuyu12345-web123 no the code works just fine. I had asked 2Captcha about the same thing. Perhaps they, along with other captcha solvers, had to remove mentions of hCaptcha from their websites for legal reasons, although they were not clear about why they removed the documentation. But it's working just fine, it returns the solution token.
image

@adittyasharma
Copy link

Here is a little more code. For the first few attempts, it works, but Suno still somehow detects and adds the "This is a fake app" lyrics. Even before the check is required, it still includes the "SUNO" watermark on the cover pictures of the generated songs when used through the API. However, the watermark does not appear if used in a browser.

async def generate_music(session, data, token):
    headers = {"Authorization": f"Bearer {token}"}
    # Check if captcha verification is needed
    check = await fetch(
        session,
        f"{BASE_URL}/api/c/check",
        headers=headers,
        data={"ctype": "generation"},
    )
    if check.get("required") == True:
        print("Captcha verification required.", check)
        data["token"] = await solve_hcaptcha(session)
    api_url = f"{BASE_URL}/api/generate/v2/"
    response = await fetch(session, api_url, headers, data)
    return response

@yuyu12345-web123
Copy link
Author

I think Suno itself will not verify, but hcaptcha changed their algorithm, causing the existing verification string to be invalid. I spent 3 dollars to try, and it failed.

@djp82645
Copy link

@dudu-123
Copy link

API:https://surl.id/1uHGqGzlH2
Docking documents:https://surl.id/1uHGqGzIBt
referral earnings:https://surl.id/1uHGqGbqs7

@Lynn0990
Copy link

Exciting News! The Watermark-Free Version of SUNO Music API is Now Live! Fully Supports the Latest V4 Version, More Powerful Features!
(99% of APIs on the market may still have the "This is a fake app" watermark)

Welcome to experience for free: https://surl.id/1uHIdUobVg
API: https://surl.id/1uHIdUmZQU
Documentation: https://surl.id/1uHIdUmyFr

Background:
Recently, SUNO introduced the robust hCaptcha security mechanism, resulting in nearly 99% of APIs on the market embedding the "This is a fake app" watermark in generated audio. This measure not only targets third-party cracking services but also accurately identifies genuine user verification behaviors. APIs that fail to completely bypass hCaptcha will include the "This is a fake app" tag in their output.Through relentless effort and in-depth research, our team has successfully circumvented this restriction using advanced high-fidelity captcha cracking simulation techniques.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants