JodelAPI icon indicating copy to clipboard operation
JodelAPI copied to clipboard

SolveCaptcha sends 500

Open MichaelVoelkel opened this issue 8 years ago • 9 comments

Hi,

first of all, thanks for your great API!

I can read Jodels but now I would like to post one. First, I got 478, so I figured I need to solve a Captcha. So, I get the capture, set a break point, get the URL from the Captcha object, solve it, write the numbers into an int[] array and send that to SolveCaptcha(captcha, intArray);

I have tried multiple times now but it is always wrong. If the raccoon is in the first and last block, for example, my int array will be [0, 8].

However, I get an HTTP code of 500 upon calling SolveCaptcha. Any ideas? I can provide some simple code if helpful.

Edit: Oh, it seems they have removed the captcha verification and replaced it with some kind of Google call: https://github.com/nborrmann/jodel_api/issues/31

MichaelVoelkel avatar Jun 15 '17 20:06 MichaelVoelkel

I will definitely look into it! Can you verify that you don't already solve the captcha with null values at getting it? You have only 1 chance to solve it. I'll look into it in the next hours.

ioncodes avatar Jun 16 '17 05:06 ioncodes

I don't think I already solve it, how would you suggest that I verify? GetCaptcha() itself does not seem to call SolveCaptcha. I have also tried using VerifyAutomatically() which results in a 500 server error, as well.

MichaelVoelkel avatar Jun 16 '17 06:06 MichaelVoelkel

Hey Ioncodes, first of all i want to tell you how great your work is! We are using your API for 4 months now and you are very fast in updating and your code looks awesome! I am really sure i try to verify Captchas right, but you can take a look in our ConsoleApp Code: ` private bool verify(Jodel pJodel) { Jodel jodel = pJodel; var captcha = jodel.GetCaptcha(); System.Diagnostics.Process.Start(captcha.ImageUrl); int value; List solveing = new List();

        Console.WriteLine("VERIFICATION PROCESS:");

        do
        {
            Console.Write("Enter indize of raccoon: ");
            string c = Console.ReadLine();

            if (int.TryParse(c, out value))
            {
                solveing.Add(value);
            }
            else
            {
                Console.WriteLine("NO INPUT! EXITING ARRAY!");
                value = 99;
            }

        } while (value != 99);


        int[] solve = solveing.ToArray();
        Console.WriteLine(solveing.ToString());

        if (jodel.SolveCaptcha(captcha, solve))
        {
            Console.WriteLine("Verification completed! Remoteserver answered 'TRUE'");
            return true;
        }
        else
        {
            Console.WriteLine("Verification unsuccessfull! Remoteserver answered 'FALSE'");
            return false;
        }
    }`

It worked since yesterday, but now the Libary crashes with the mentioned 500 Servererror. We also wanted to ask if you accept donations? Its typically for Open Source Software, but we did not find any donation button as normally. BTW: We are currently working on the same API just with iPhone Headers to avoid verification processing, if interested just send a pm.

Have a nice day and good luck with your fix!

PXRDevelopment avatar Jun 16 '17 08:06 PXRDevelopment

@Elypson and @PXRDevelopment I will try to extract a key from the newest apk and add it to the API if it is able to extract one. The mentioned issue is triggered by the new verification system. I will try to reverse it and implement it. I will soon open either a new branch or a new repo, for the verification reversing.

@PXRDevelopment I appreciate it, thanks :) I will add a donation button now. Also I'm indeed interested in your method! Can you hit me up via Gitter?

ioncodes avatar Jun 16 '17 10:06 ioncodes

@PXRDevelopment I added a donation button to the badge bar :)

ioncodes avatar Jun 16 '17 11:06 ioncodes

I see that you already pushed the key for 4.48. That currently does not work for voting and posting. The 4.47 key still works for everything right now, so you might want to rollback that change (until the 4.47 key is disabled in a week or so).

nborrmann avatar Jun 16 '17 20:06 nborrmann

@nborrmann Thanks for letting me know!

ioncodes avatar Jun 16 '17 20:06 ioncodes

4.47 works for everything? I still get 500 at commit 3931d3 (v 4.47)... strange?! Maybe, my code is wrong?

JodelAPI.Jodel jodel = new JodelAPI.Jodel("Cologne Germany", "DE", "Cologne");
            try
            {
                jodel.Account.Place.SetNewPlace(52.924752, 5.907060);
                jodel.SetLocation();

                Console.Write(jodel.GenerateAccessToken());

                Captcha c = jodel.GetCaptcha();

                string readInts = Console.ReadLine();

                var ints = readInts.Split(' ').Select(Int32.Parse).ToArray();
                
                bool answer = jodel.SolveCaptcha(c, ints);
}
catch(Exception e)
{
// ...
}

I set the breakpoint in the line of "Console.ReadLine()" to look the URL in the browser first

MichaelVoelkel avatar Jun 17 '17 10:06 MichaelVoelkel

No, captchas have been removed entirely. But that's regardless of the version or the key.

nborrmann avatar Jun 17 '17 10:06 nborrmann