diff options
Diffstat (limited to 'module/plugins/crypter')
| -rw-r--r-- | module/plugins/crypter/DlProtectCom.py | 2 | ||||
| -rw-r--r-- | module/plugins/crypter/FilecryptCc.py | 12 | ||||
| -rw-r--r-- | module/plugins/crypter/LinkCryptWs.py | 6 | ||||
| -rw-r--r-- | module/plugins/crypter/LinkdecrypterCom.py | 2 | ||||
| -rw-r--r-- | module/plugins/crypter/LixIn.py | 2 | ||||
| -rw-r--r-- | module/plugins/crypter/NCryptIn.py | 8 | ||||
| -rw-r--r-- | module/plugins/crypter/RelinkUs.py | 6 | ||||
| -rw-r--r-- | module/plugins/crypter/ShareLinksBiz.py | 8 | 
8 files changed, 23 insertions, 23 deletions
| diff --git a/module/plugins/crypter/DlProtectCom.py b/module/plugins/crypter/DlProtectCom.py index 4a6c4bddf..4626af105 100644 --- a/module/plugins/crypter/DlProtectCom.py +++ b/module/plugins/crypter/DlProtectCom.py @@ -54,7 +54,7 @@ class DlProtectCom(SimpleCrypter):              if "Security Code" in self.html:                  m = re.search(r'/captcha\.php\?key=(.+?)"', self.html)                  if m: -                    captcha_code = self.decrypt_captcha("http://www.dl-protect.com/captcha.php?key=" + m.group(1), imgtype="gif") +                    captcha_code = self.captcha.decrypt_image("http://www.dl-protect.com/captcha.php?key=" + m.group(1), input_type="gif")                      post_req['secure'] = captcha_code          self.html = self.load(self.pyfile.url, post=post_req) diff --git a/module/plugins/crypter/FilecryptCc.py b/module/plugins/crypter/FilecryptCc.py index 24f03d175..23636f3b7 100644 --- a/module/plugins/crypter/FilecryptCc.py +++ b/module/plugins/crypter/FilecryptCc.py @@ -92,17 +92,17 @@ class FilecryptCc(Crypter):          if m:  #: Normal captcha              self.log_debug("Captcha-URL: %s" % m.group(1)) -            captcha_code = self.decrypt_captcha(urlparse.urljoin(self.base_url, m.group(1)), -                                               forceUser=True, -                                               imgtype="gif") +            captcha_code = self.captcha.decrypt_image(urlparse.urljoin(self.base_url, m.group(1)), +                                                      input_type="gif", +                                                      try_ocr=False)              self.site_with_links = self.load(self.pyfile.url,                                             post={'recaptcha_response_field': captcha_code})          elif m2:  #: Circle captcha              self.log_debug("Captcha-URL: %s" % m2.group(1)) -            captcha_code = self.decrypt_captcha('%s%s?c=abc' %(self.base_url, m2.group(1)), -                                               result_type='positional') +            captcha_code = self.captcha.decrypt_image('%s%s?c=abc' %(self.base_url, m2.group(1)), +                                               output_type='positional')              self.site_with_links = self.load(self.pyfile.url,                                             post={'button.x': captcha_code[0], 'button.y': captcha_code[1]}) @@ -120,7 +120,7 @@ class FilecryptCc(Crypter):                  self.site_with_links = self.html          if "recaptcha_image" in self.site_with_links or "data-sitekey" in self.site_with_links: -            self.invalid_captcha() +            self.captcha.invalid()              self.retry() diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index c06c8d4fe..5195c47c3 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -133,7 +133,7 @@ class LinkCryptWs(Crypter):      def unlock_captcha_protection(self):          captcha_url  = re.search(r'<form.*?id\s*?=\s*?"captcha"[^>]*?>.*?<\s*?input.*?src="(.+?)"', self.html, re.I | re.S).group(1) -        captcha_code = self.decrypt_captcha(captcha_url, forceUser=True, imgtype="gif", result_type='positional') +        captcha_code = self.captcha.decrypt_image(captcha_url, input_type="gif", output_type='positional', try_ocr=False)          self.html = self.load(self.pyfile.url, post={'x': captcha_code[0], 'y': captcha_code[1]}) @@ -167,10 +167,10 @@ class LinkCryptWs(Crypter):      def handle_captcha_errors(self):          if self.captcha:              if "Your choice was wrong!" in self.html: -                self.invalid_captcha() +                self.captcha.invalid()                  self.retry()              else: -                self.correct_captcha() +                self.captcha.correct()      def handle_link_source(self, type): diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py index d9d95f76e..1936425f2 100644 --- a/module/plugins/crypter/LinkdecrypterCom.py +++ b/module/plugins/crypter/LinkdecrypterCom.py @@ -52,7 +52,7 @@ class LinkdecrypterCom(Crypter):                  msg = m.group(1) if m else ""                  self.log_info(_("Captcha protected link"), result_type, msg) -                captcha = self.decrypt_captcha(captcha_url, result_type=result_type) +                captcha = self.captcha.decrypt_image(captcha_url, output_type=result_type)                  if result_type == "positional":                      captcha = "%d|%d" % captcha                  self.html = self.load('http://linkdecrypter.com/', post={'captcha': captcha}) diff --git a/module/plugins/crypter/LixIn.py b/module/plugins/crypter/LixIn.py index e78d6d8df..67037ae79 100644 --- a/module/plugins/crypter/LixIn.py +++ b/module/plugins/crypter/LixIn.py @@ -48,7 +48,7 @@ class LixIn(Crypter):                  m = re.search(self.CAPTCHA_PATTERN, self.html)                  if m:                      self.log_debug("Trying captcha") -                    captcharesult = self.decrypt_captcha(urlparse.urljoin("http://lix.in/", m.group(1))) +                    captcharesult = self.captcha.decrypt_image(urlparse.urljoin("http://lix.in/", m.group(1)))                  self.html = self.load(url,                                            post={'capt': captcharesult, 'submit': "submit", 'tiny': id})              else: diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index 2de8d1ecb..bc3f6624f 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -146,7 +146,7 @@ class NCryptIn(Crypter):          if "anicaptcha" in form:              self.log_debug("Captcha protected")              captchaUri = re.search(r'src="(/temp/anicaptcha/.+?)"', form).group(1) -            captcha = self.decrypt_captcha("http://ncrypt.in" + captchaUri) +            captcha = self.captcha.decrypt_image("http://ncrypt.in" + captchaUri)              self.log_debug("Captcha resolved [%s]" % captcha)              postData['captcha'] = captcha @@ -164,7 +164,7 @@ class NCryptIn(Crypter):          if "circlecaptcha" in form:              self.log_debug("CircleCaptcha protected")              captcha_img_url = "http://ncrypt.in/classes/captcha/circlecaptcha.php" -            coords = self.decrypt_captcha(captcha_img_url, forceUser=True, imgtype="png", result_type='positional') +            coords = self.captcha.decrypt_image(captcha_img_url, input_type="png", output_type='positional', try_ocr=False)              self.log_debug("Captcha resolved, coords [%s]" % str(coords))              postData['circle.x'] = coords[0]              postData['circle.y'] = coords[1] @@ -182,10 +182,10 @@ class NCryptIn(Crypter):          if self.protection_type == "captcha":              if "The securitycheck was wrong!" in self.cleaned_html: -                self.invalid_captcha() +                self.captcha.invalid()                  self.retry()              else: -                self.correct_captcha() +                self.captcha.correct()      def handle_link_source(self, link_source_type): diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index c2b72ae0e..f95da1b26 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -142,7 +142,7 @@ class RelinkUs(Crypter):      def unlock_captcha_protection(self):          self.log_debug("Request user positional captcha resolving")          captcha_img_url = self.CAPTCHA_IMG_URL + "?id=%s" % self.fileid -        coords = self.decrypt_captcha(captcha_img_url, forceUser=True, imgtype="png", result_type='positional') +        coords = self.captcha.decrypt_image(captcha_img_url, input_type="png", output_type='positional', try_ocr=False)          self.log_debug("Captcha resolved, coords [%s]" % str(coords))          captcha_post_url = self.CAPTCHA_SUBMIT_URL + "?id=%s" % self.fileid          captcha_post_data = {'button.x': coords[0], 'button.y': coords[1], 'captcha': 'submit'} @@ -178,10 +178,10 @@ class RelinkUs(Crypter):          if self.captcha:              if self.CAPTCHA_ERROR_ROKEN in self.html: -                self.invalid_captcha() +                self.captcha.invalid()                  self.retry()              else: -                self.correct_captcha() +                self.captcha.correct()      def handle_link_source(self, source): diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index d717431a6..894b6d010 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -117,13 +117,13 @@ class ShareLinksBiz(Crypter):          m = re.search(r'<img src="/captcha.gif\?d=(.*?)&PHPSESSID=(.*?)&legend=1"', self.html)          captchaUrl = self.base_url + '/captcha.gif?d=%s&PHPSESSID=%s' % (m.group(1), m.group(2))          self.log_debug("Waiting user for correct position") -        coords = self.decrypt_captcha(captchaUrl, forceUser=True, imgtype="gif", result_type='positional') +        coords = self.captcha.decrypt_image(captchaUrl, input_type="gif", output_type='positional', try_ocr=False)          self.log_debug("Captcha resolved, coords [%s]" % str(coords))          #: Resolve captcha          href = self._resolve_coords(coords, captchaMap)          if href is None: -            self.invalid_captcha() +            self.captcha.invalid()              self.retry(wait_time=5)          url = self.base_url + href          self.html = self.load(url) @@ -153,10 +153,10 @@ class ShareLinksBiz(Crypter):          if self.captcha:              if "Your choice was wrong" in self.html: -                self.invalid_captcha() +                self.captcha.invalid()                  self.retry(wait_time=5)              else: -                self.correct_captcha() +                self.captcha.correct()      def get_package_info(self): | 
