PNG problem

Hi everyone! I’m trying to solve a simple image>text captcha, but OB2 isn’t getting the file right.

When I get the captcha hash in OB2 and do a get to the link, it gets the .PNG, but when I parse data.rawsource or data.response I get a corrupted file (not working on my PC or on the Captcha solver service). (Yes, I byte 2 Base the parsed PNG before sending it to solver. Anyway I cannot open the response got by OB2 (open html then change extension to png) or copying the response directly to a empy file).

Anyway, I got my captcha hash from OB2 and send the same request with Firefox (it’s something like example.com/captcha.php?hash=1234abcdf) and it works good and get the file right.

When I open or check the wrong PNG, I just it looks like a PNG, but must be some codification problem or something like that. Do anyone encounter this problem? Any solution?

Solved, somehow using the data.rawsource as origin for the bytes=>Base64 worked.
Parsing all data.rawsource and using that variable as origin for b=>Base64 won’t.

That’s because parsing a variable of type ByteArray via a Parse block will convert it to a UTF8 string representation, which is not valid anymore. You have to use the ByteArray directly.

1 Like