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

Rapidgator: CAPTCHA can't be shown due to (new?) X-Frame-Options header #4456

Open
mihawk90 opened this issue May 3, 2024 · 4 comments
Open
Assignees
Labels
bug Something isn't working pyLoad Next

Comments

@mihawk90
Copy link
Contributor

mihawk90 commented May 3, 2024

Description

This has been going on a couple weeks now but I hoped this was going to be fixed on RGs end, it doesn't seem that way though.
When trying to solve an RG captcha using the captcha dialogue (with the userscript installed of course), there is no captcha shown anymore.
A glance at the Dev tools makes it obvious why:

Refused to display 'https://rapidgator.net/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Example-URL:
https://rapidgator.net/file/7a093c324242c22df1e9b5c9bc87bc82/

 ~  curl -I https://rapidgator.net/file/7a093c324242c22df1e9b5c9bc87bc82/ | grep "X-Frame-Options"
X-Frame-Options: SAMEORIGIN

Debug log

[2024-05-03 06:44:00]  INFO                pyload  Added package PYLOAD_RG_CAPTCHA_TEST containing 1 links
[2024-05-03 06:44:00]  INFO                pyload  Download starts: 7a093c324242c22df1e9b5c9bc87bc82
[2024-05-03 06:44:00]  DEBUG               pyload  ADDON ExternalScripts: No script found under folder `download_preparing`
[2024-05-03 06:44:00]  DEBUG               pyload  ADDON UserAgentSwitcher: Setting connection timeout to 60 seconds
[2024-05-03 06:44:00]  DEBUG               pyload  ADDON UserAgentSwitcher: Setting maximum redirections to 10
[2024-05-03 06:44:00]  DEBUG               pyload  ADDON UserAgentSwitcher: Use custom user-agent string `Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0`
[2024-05-03 06:44:00]  DEBUG               pyload  DOWNLOADER RapidgatorNet[12441]: Plugin version: 0.59
[2024-05-03 06:44:00]  DEBUG               pyload  DOWNLOADER RapidgatorNet[12441]: Plugin status: testing
[2024-05-03 06:44:00]  WARNING             pyload  DOWNLOADER RapidgatorNet[12441]: Plugin may be unstable
[2024-05-03 06:44:00]  INFO                pyload  DOWNLOADER RapidgatorNet[12441]: Processing url: https://rapidgator.net/file/7a093c324242c22df1e9b5c9bc87bc82/
[2024-05-03 06:44:00]  INFO                pyload  DOWNLOADER RapidgatorNet[12441]: Looking for direct download link...
[2024-05-03 06:44:00]  DEBUG               pyload  DOWNLOADER RapidgatorNet[12441]: LOAD URL https://rapidgator.net/file/7a093c324242c22df1e9b5c9bc87bc82 | get={} | post={} | ref=True | cookies=True | just_header=True | decode=True | multipart=False | redirect=False | req=None
[2024-05-03 06:44:00]  INFO                pyload  DOWNLOADER RapidgatorNet[12441]: Direct download link not found
[2024-05-03 06:44:00]  DEBUG               pyload  DOWNLOADER RapidgatorNet[12441]: LOAD URL https://rapidgator.net/file/7a093c324242c22df1e9b5c9bc87bc82 | get={} | post={} | ref=False | cookies=[('rapidgator.net', 'lang', 'en')] | just_header=False | decode=True | multipart=False | redirect=True | req=None
[2024-05-03 06:44:00]  INFO                pyload  DOWNLOADER RapidgatorNet[12441]: Checking for link errors...
[2024-05-03 06:44:00]  INFO                pyload  DOWNLOADER RapidgatorNet[12441]: No errors found
[2024-05-03 06:44:00]  INFO                pyload  DOWNLOADER RapidgatorNet[12441]: Grabbing link info...
[2024-05-03 06:44:00]  DEBUG               pyload  DOWNLOADER RapidgatorNet[12441]: Link info: {'name': 'a6a9a8f5-e3b9-47aa-9b9a-df9a01e84860.part1.rar', 'hash': {}, 'pattern': {'ID': '7a093c324242c22df1e9b5c9bc87bc82', 'N': 'a6a9a8f5-e3b9-47aa-9b9a-df9a01e84860.part1.rar', 'S': '1020', 'U': 'MB'}, 'size': 1069547520, 'status': 2, 'url': 'https://rapidgator.net/file/7a093c324242c22df1e9b5c9bc87bc82'}
[2024-05-03 06:44:00]  DEBUG               pyload  DOWNLOADER RapidgatorNet[12441]: Previous link info: {}
[2024-05-03 06:44:00]  INFO                pyload  DOWNLOADER RapidgatorNet[12441]: Link name: a6a9a8f5-e3b9-47aa-9b9a-df9a01e84860.part1.rar
[2024-05-03 06:44:00]  INFO                pyload  DOWNLOADER RapidgatorNet[12441]: Link size: 1020.00 MiB (1069547520 bytes)
[2024-05-03 06:44:00]  INFO                pyload  DOWNLOADER RapidgatorNet[12441]: Link status: online
[2024-05-03 06:44:00]  INFO                pyload  DOWNLOADER RapidgatorNet[12441]: Processing as free download...
[2024-05-03 06:44:00]  DEBUG               pyload  DOWNLOADER RapidgatorNet[12441]: {'startTimerUrl': '/download/AjaxStartTimer', 'getDownloadUrl': '/download/AjaxGetDownloadLink', 'captchaUrl': '/download/captcha', 'secs': '180', 'fid': '780738041'}
[2024-05-03 06:44:00]  DEBUG               pyload  DOWNLOADER RapidgatorNet[12441]: LOAD URL https://rapidgator.net/download/AjaxStartTimer?fid=780738041 | get={} | post={} | ref=https://rapidgator.net/file/7a093c324242c22df1e9b5c9bc87bc82 | cookies=True | just_header=False | decode=True | multipart=False | redirect=True | req=None
[2024-05-03 06:44:00]  DEBUG               pyload  DOWNLOADER RapidgatorNet[12441]: https://rapidgator.net/download/AjaxStartTimer?fid=780738041 | {"state":"started","sid":"rYCpQ8I78tbx2vl0ecg2f9goh1wsg0gc"}
[2024-05-03 06:44:00]  DEBUG               pyload  DOWNLOADER RapidgatorNet[12441]: WAIT set to timestamp 1714718821.802558 | Previous wait_until: 0
[2024-05-03 06:44:00]  INFO                pyload  DOWNLOADER RapidgatorNet[12441]: Waiting 3 minutes...
[2024-05-03 06:44:25]  DEBUG               pyload  ADDON ClickNLoad: Connection from 1.64.199.219:52824
[2024-05-03 06:46:05]  DEBUG               pyload  ADDON ClickNLoad: Connection from 1.64.199.219:53656
[2024-05-03 06:46:17]  INFO                pyload  ADDON RestartFailed: Restarting all failed downloads...
[2024-05-03 06:46:50]  DEBUG               pyload  ADDON ClickNLoad: Connection from 1.64.199.219:54028
[2024-05-03 06:47:02]  DEBUG               pyload  DOWNLOADER RapidgatorNet[12441]: LOAD URL https://rapidgator.net/download/AjaxGetDownloadLink?sid=rYCpQ8I78tbx2vl0ecg2f9goh1wsg0gc | get={} | post={} | ref=https://rapidgator.net/file/7a093c324242c22df1e9b5c9bc87bc82 | cookies=True | just_header=False | decode=True | multipart=False | redirect=True | req=None
[2024-05-03 06:47:02]  DEBUG               pyload  DOWNLOADER RapidgatorNet[12441]: https://rapidgator.net/download/AjaxGetDownloadLink?sid=rYCpQ8I78tbx2vl0ecg2f9goh1wsg0gc | {"state":"done"}
[2024-05-03 06:47:02]  DEBUG               pyload  DOWNLOADER RapidgatorNet[12441]: LOAD URL https://rapidgator.net/download/captcha | get={} | post={} | ref=https://rapidgator.net/file/7a093c324242c22df1e9b5c9bc87bc82 | cookies=True | just_header=False | decode=True | multipart=False | redirect=True | req=None
[2024-05-03 06:47:02]  DEBUG               pyload  ANTICAPTCHA RapidgatorNet[12441]: ReCaptcha | Key: 6LcSUAsUAAAAAKBeQQE893pf0Io66-mIeKWPl5yF
[2024-05-03 06:47:02]  DEBUG               pyload  ANTICAPTCHA RapidgatorNet[12441]: ReCaptcha | Key: 6LcSUAsUAAAAAKBeQQE893pf0Io66-mIeKWPl5yF
[2024-05-03 06:47:02]  WARNING             pyload  ANTICAPTCHA RapidgatorNet[12441]: ReCaptcha | Secure Token pattern not found
[2024-05-03 06:47:02]  DEBUG               pyload  ANTICAPTCHA RapidgatorNet[12441]: ReCaptcha | Detected reCAPTCHA v2
[2024-05-03 06:47:02]  WARNING             pyload  ANTICAPTCHA RapidgatorNet[12441]: ReCaptcha | Secure Token pattern not found
[2024-05-03 06:47:02]  DEBUG               pyload  DOWNLOADER RapidgatorNet[12441]: LOAD URL http://www.google.com/recaptcha/api/fallback?k=6LcSUAsUAAAAAKBeQQE893pf0Io66-mIeKWPl5yF | get={} | post={} | ref=https://rapidgator.net/file/7a093c324242c22df1e9b5c9bc87bc82 | cookies=True | just_header=False | decode=True | multipart=False | redirect=True | req=None
[2024-05-03 06:47:03]  WARNING             pyload  ANTICAPTCHA RapidgatorNet[12441]: ReCaptcha | reCAPTCHA noscript is blocked, trying reCAPTCHA interactive
[2024-05-03 06:47:03]  DEBUG               pyload  ANTICAPTCHA RapidgatorNet[12441]: ReCaptcha | Challenge reCAPTCHA v2 interactive
[2024-05-03 06:47:03]  DEBUG               pyload  ADDON Captcha9Kw: LOAD URL https://www.9kw.eu/index.cgi | get={'apikey': '<removed>', 'pyload': '1', 'source': 'pyload', 'action': 'usercaptchaguthaben'} | post={} | ref=True | cookies=True | just_header=False | decode=True | multipart=False | redirect=True | req=None
[2024-05-03 06:47:03]  INFO                pyload  ADDON Captcha9Kw: 35 credits left
[2024-05-03 06:47:03]  DEBUG               pyload  ADDON Captcha9Kw: LOAD URL http://www.9kw.eu/grafik/servercheck.txt | get={} | post={} | ref=True | cookies=True | just_header=False | decode=True | multipart=False | redirect=True | req=None
[2024-05-03 06:47:03]  DEBUG               pyload  ADDON Captcha9Kw: LOAD URL https://www.9kw.eu/index.cgi | get={} | post={'pageurl': 'https://rapidgator.net/', 'oldsource': 'recaptchav2', 'captchachoice': 'recaptchav2', 'isInvisible': 'NORMAL', 'data-sitekey': '6LcSUAsUAAAAAKBeQQE893pf0Io66-mIeKWPl5yF', 'securetoken': None, 'apikey': '<removed>', 'prio': 0, 'confirm': False, 'maxtimeout': 900, 'selfsolve': True, 'captchaperhour': 9999, 'captchapermin': 9999, 'case-sensitive': 0, 'min_len': 2, 'max_len': 50, 'phrase': 0, 'numeric': 0, 'math': 0, 'pyload': 1, 'source': 'pyload', 'base64': 0, 'mouse': 0, 'interactive': 1, 'action': 'usercaptchaupload'} | ref=True | cookies=True | just_header=False | decode=True | multipart=False | redirect=True | req=None
[2024-05-03 06:47:03]  DEBUG               pyload  ADDON Captcha9Kw: NewCaptchaID ticket: 159096567 | 
[2024-05-03 06:47:03]  DEBUG               pyload  ADDON Captcha9Kw: LOAD URL https://www.9kw.eu/index.cgi | get={'apikey': '<removed>', 'id': '159096567', 'pyload': '1', 'info': '1', 'source': 'pyload', 'action': 'usercaptchacorrectdata'} | post={} | ref=True | cookies=True | just_header=False | decode=True | multipart=False | redirect=True | req=None
[2024-05-03 06:47:08]  DEBUG               pyload  ADDON Captcha9Kw: LOAD URL https://www.9kw.eu/index.cgi | get={'apikey': '<removed>', 'id': '159096567', 'pyload': '1', 'info': '1', 'source': 'pyload', 'action': 'usercaptchacorrectdata'} | post={} | ref=True | cookies=True | just_header=False | decode=True | multipart=False | redirect=True | req=None
[2024-05-03 06:47:13]  DEBUG               pyload  ADDON Captcha9Kw: LOAD URL https://www.9kw.eu/index.cgi | get={'apikey': '<removed>', 'id': '159096567', 'pyload': '1', 'info': '1', 'source': 'pyload', 'action': 'usercaptchacorrectdata'} | post={} | ref=True | cookies=True | just_header=False | decode=True | multipart=False | redirect=True | req=None
[2024-05-03 06:47:18]  DEBUG               pyload  ADDON Captcha9Kw: LOAD URL https://www.9kw.eu/index.cgi | get={'apikey': '<removed>', 'id': '159096567', 'pyload': '1', 'info': '1', 'source': 'pyload', 'action': 'usercaptchacorrectdata'} | post={} | ref=True | cookies=True | just_header=False | decode=True | multipart=False | redirect=True | req=None
[2024-05-03 06:47:23]  DEBUG               pyload  ADDON Captcha9Kw: LOAD URL https://www.9kw.eu/index.cgi | get={'apikey': '<removed>', 'id': '159096567', 'pyload': '1', 'info': '1', 'source': 'pyload', 'action': 'usercaptchacorrectdata'} | post={} | ref=True | cookies=True | just_header=False | decode=True | multipart=False | redirect=True | req=None

And yes downloads do still work when the captcha is eventually solved through 9kw or another captcha service.

@mihawk90 mihawk90 added bug Something isn't working pyLoad Next labels May 3, 2024
@GammaC0de
Copy link
Member

Have you looked ate #3264 (comment)?

@mihawk90
Copy link
Contributor Author

mihawk90 commented May 3, 2024

That would be a temporary solution but surely disabling browser security can't be a permanent recommendation (which even the extension author points out).

That being said I can't think of anything else right now either, I just wanted it tracked for others experiencing the same issue.

@GammaC0de
Copy link
Member

This is the official solution to overcome this problem.
You can limit the plug-in to specific sites.

If you have a better solution you're welcome to issue a pull request.

@milahu
Copy link

milahu commented May 8, 2024

disabling browser security

this "security" means less freedom

a "secure" solution would be to start a new headful browser
to show the original website where you can solve the captcha
and get the captcha solution by sniffing the network traffic
then continue the file download in python
for example with Selenium-Driverless

or run the second browser on an xvnc display
and use a browser-based vncviewer to solve the captcha
for example with noVNC or BrowserBox
but in my experience
when running a browser in xvnc, you get blocked by cloudflare
(probably because xvnc hurts the rendering performance)
so this could also be detected and blocked by other websites

or do something like jdownloader...
parse the website, extract the captcha
and show the captcha in a new popup window

in any case:
how many hours do you want to invest to implement this feature
which has a workaround already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pyLoad Next
Development

No branches or pull requests

4 participants