Skip to content
This repository was archived by the owner on Sep 25, 2021. It is now read-only.

#696, New captcha window #697

Closed
wants to merge 11 commits into from
Closed

#696, New captcha window #697

wants to merge 11 commits into from

Conversation

K1rakishou
Copy link
Member

@K1rakishou K1rakishou commented Apr 28, 2019

Closes #696
For some reason it takes me like 20 tries to solve the captcha maybe because I tested it a lot today and it just doesn't like me now. Or maybe I forgot to add something (I did add the SID, HSID, SSID and NID cookies though). It should automatically fallback to the webview captcha if something couldn't be parsed (or you can use the button).

345345

@Adamantcheese
Copy link
Contributor

@K1rakishou I submitted a PR to fix the checkmark not being centered, and having to use an extra background view to make it white due to transparency.

@K1rakishou
Copy link
Member Author

K1rakishou commented May 9, 2019

@Adamantcheese

checkmark not being centered

But that's how it is implemented in the google's recaptcha window. You think it should be centered?
234234

to make it white due to transparency

And this one already fixed here - 2820d23#diff-460f4eca5fc92d000ad076afc5756ccaR31

Btw, do you have to enter the captcha like 10-15 times until it is accepted too? I even changed the cookies to the one dashchan uses but it still forces me to enter the captcha a lot of times. Apparently something is missing, but I can't figure out what exactly.

@Adamantcheese
Copy link
Contributor

Adamantcheese commented May 9, 2019

The white thing I changed so it's part of the drawable and doesn't use an underlying view to make it white, because that's just silly. And for me that check mark was appearing... elsewhere? Here's a photo of the Pixel 2 emulator from when I tested it. It looks like you've crafted it specifically for the second style of captcha and not the first one, and I pretty much only ever get the 3x3 kind and not the 4x4 kind.

It's easier to center it anyways, I don't super care about looks for it.

@Adamantcheese
Copy link
Contributor

And yeah, I had to enter the Captcha like 5-6 times.

@K1rakishou
Copy link
Member Author

@Adamantcheese

The white thing I changed so it's part of the drawable and doesn't use an underlying view to make it white, because that's just silly.

Oh yeah, this makes sence.

And for me that check mark was appearing... elsewhere? Here's a photo of the Pixel 2 emulator from when I tested it. It looks like you've crafted it specifically for the second style of captcha and not the first one, and I pretty much only ever get the 3x3 kind and not the 4x4 kind.

Well that's strange because I only get the 3x3 captchas too and the checkmark is where it is supposed to be (upper left corner).

@K1rakishou
Copy link
Member Author

Alright then I will merge it later today. Still we have to do something with the amount of captcha attempts it takes to make a post.

@Adamantcheese
Copy link
Contributor

It could be that, if we're both testing on emulators, it's just giving us more to ensure that we're not robots. If you're testing on an actual device though, yeah, it's a problem.

@K1rakishou
Copy link
Member Author

@Adamantcheese
Over the last week I tried it on the real device too and most of the time it gives you the same amount of challenges. But sometimes it just accepts the first one.

@Adamantcheese
Copy link
Contributor

Weird. I don't know anything about how Captcha works though, so I won't be much help.

@K1rakishou
Copy link
Member Author

Well, I guess for now we can just make it opt-out.
The other idea I have is to get the real google cookies upon the first app run, then store them somewhere and use them instead of the hardcoded ones.

@Adamantcheese
Copy link
Contributor

From a little research it looks like the cookies might be per-user, which would make the hardcoded ones a problem anyways because anyone using the app would be using the same cookie and they might be around the world, which looks sketchy as hell.

@K1rakishou
Copy link
Member Author

Yeah, probably. But on the other hand dashchan uses hardcoded cookies and works just fine.

@Adamantcheese
Copy link
Contributor

Weird. No idea then.

@K1rakishou
Copy link
Member Author

Alright. I added two new settings to enable/disable the new captcha window and to use the real or the default google cookie. In case of using the real cookie a GET request to the google.com will be made to retrieve the NID cookie (apparently it is the most important among all of them) then this cookie will be used for recaptcha requests until app restart. Also I added a button to manually refresh the cookie (sometimes it helps when you are stuck in the challenge hell). It does look like it helps a little bit when using the real google cookie.

Store real google cookie up to three months instead of until the next app restart
@K1rakishou
Copy link
Member Author

K1rakishou commented May 18, 2019

Instead of refreshing google cookies (when this option is enabled) on every app start I decided to do it once in three months (but there is still an ability to refresh them manually). I think it is a better idea to not refresh them way too often.

@K1rakishou K1rakishou closed this Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Implement new captcha window as a replacement for the webview one
2 participants