summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/internal/CaptchaService.py25
1 files changed, 8 insertions, 17 deletions
diff --git a/module/plugins/internal/CaptchaService.py b/module/plugins/internal/CaptchaService.py
index 3978a96c4..ec938079a 100644
--- a/module/plugins/internal/CaptchaService.py
+++ b/module/plugins/internal/CaptchaService.py
@@ -15,7 +15,7 @@ from module.plugins.Plugin import Base
class CaptchaService(Base):
__name__ = "CaptchaService"
__type__ = "captcha"
- __version__ = "0.25"
+ __version__ = "0.26"
__description__ = """Base captcha service plugin"""
__license__ = "GPLv3"
@@ -45,7 +45,7 @@ class CaptchaService(Base):
class ReCaptcha(CaptchaService):
__name__ = "ReCaptcha"
__type__ = "captcha"
- __version__ = "0.14"
+ __version__ = "0.15"
__description__ = """ReCaptcha captcha service plugin"""
__license__ = "GPLv3"
@@ -201,21 +201,12 @@ class ReCaptcha(CaptchaService):
token2 = re.search(r'"finput","(.*?)",', html)
self.logDebug("Token #2: %s" % token2.group(1))
- token3 = re.search(r'."asconf".\s,".*?".\s,"(.*?)".', html)
+ token3 = re.search(r'"rresp","(.*?)",', html)
self.logDebug("Token #3: %s" % token3.group(1))
- html = self.plugin.req.load("https://www.google.com/recaptcha/api2/reload",
- post={'k' : key,
- 'c' : token2.group(1),
- 'reason': "fi",
- 'fbg' : token3.group(1)})
-
- token4 = re.search(r'"rresp","(.*?)",', html)
- self.logDebug("Token #4: %s" % token4.group(1))
-
millis_captcha_loading = int(round(time.time() * 1000))
captcha_response = self.plugin.decryptCaptcha("https://www.google.com/recaptcha/api2/payload",
- get={'c':token4.group(1), 'k':key},
+ get={'c':token3.group(1), 'k':key},
cookies=True,
forceUser=True)
response = b64encode('{"response":"%s"}' % captcha_response)
@@ -227,16 +218,16 @@ class ReCaptcha(CaptchaService):
html = self.plugin.req.load("https://www.google.com/recaptcha/api2/userverify",
post={'k' : key,
- 'c' : token4.group(1),
+ 'c' : token3.group(1),
'response': response,
't' : timeToSolve,
'ct' : timeToSolveMore,
'bg' : botguardstring})
- token5 = re.search(r'"uvresp","(.*?)",', html)
- self.logDebug("Token #5: %s" % token5.group(1))
+ token4 = re.search(r'"uvresp","(.*?)",', html)
+ self.logDebug("Token #4: %s" % token4.group(1))
- result = token5.group(1)
+ result = token4.group(1)
return result, None