diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-09-14 02:08:19 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-09-14 02:08:19 +0200 |
commit | 36e54a3ee89aafeffdc7eab789502decf11ca2ac (patch) | |
tree | 50379457400bb6f89eb75188aec4f22d3ebb7797 | |
parent | Merge pull request #1820 from Bambie42/stable (diff) | |
download | pyload-36e54a3ee89aafeffdc7eab789502decf11ca2ac.tar.xz |
Update main Captcha plugin
-rw-r--r-- | module/plugins/accounts/LinestorageCom.py | 18 | ||||
-rw-r--r-- | module/plugins/crypter/LinkCryptWs.py | 6 | ||||
-rw-r--r-- | module/plugins/hooks/XFileSharingPro.py | 12 | ||||
-rw-r--r-- | module/plugins/internal/Captcha.py | 12 |
4 files changed, 16 insertions, 32 deletions
diff --git a/module/plugins/accounts/LinestorageCom.py b/module/plugins/accounts/LinestorageCom.py deleted file mode 100644 index 87dd2a1d3..000000000 --- a/module/plugins/accounts/LinestorageCom.py +++ /dev/null @@ -1,18 +0,0 @@ -# -*- coding: utf-8 -*- - -from module.plugins.internal.XFSAccount import XFSAccount - - -class LinestorageCom(XFSAccount): - __name__ = "LinestorageCom" - __type__ = "account" - __version__ = "0.04" - __status__ = "testing" - - __description__ = """Linestorage.com account plugin""" - __license__ = "GPLv3" - __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - - - HOSTER_DOMAIN = "linestorage.com" - HOSTER_URL = "http://linestorage.com/" diff --git a/module/plugins/crypter/LinkCryptWs.py b/module/plugins/crypter/LinkCryptWs.py index fdb97ca2c..16ee1d4f1 100644 --- a/module/plugins/crypter/LinkCryptWs.py +++ b/module/plugins/crypter/LinkCryptWs.py @@ -14,7 +14,7 @@ from module.utils import html_unescape class LinkCryptWs(Crypter): __name__ = "LinkCryptWs" __type__ = "crypter" - __version__ = "0.11" + __version__ = "0.12" __status__ = "testing" __pattern__ = r'http://(?:www\.)?linkcrypt\.ws/(dir|container)/(?P<ID>\w+)' @@ -131,11 +131,11 @@ 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 = self.load(captcha_url, decode=False) - captcha_code = self.captcha._decrypt(captcha, input_type="gif", output_type='positional') + captcha_code = self.captcha.decrypt(captcha_url, input_type="gif", output_type='positional') self.html = self.load(self.pyfile.url, post={'x': captcha_code[0], 'y': captcha_code[1]}) + def get_package_info(self): name = self.pyfile.package().name folder = self.pyfile.package().folder diff --git a/module/plugins/hooks/XFileSharingPro.py b/module/plugins/hooks/XFileSharingPro.py index 7567a31a3..9b9c7f0ad 100644 --- a/module/plugins/hooks/XFileSharingPro.py +++ b/module/plugins/hooks/XFileSharingPro.py @@ -29,18 +29,20 @@ class XFileSharingPro(Hook): r'https?://(?:[^/]+\.)?(?P<DOMAIN>%s)/(?:user|folder)s?/\w+')} HOSTER_BUILTIN = [#WORKING HOSTERS: - "ani-stream.com", "backin.net", "cloudsix.me", "eyesfile.ca", "file4safe.com", - "fileband.com", "filedwon.com", "fileparadox.in", "filevice.com", - "hostingbulk.com", "junkyvideo.com", "linestorage.com", "ravishare.com", + "ani-stream.com", "backin.net", "cloudsix.me", "eyesfile.ca", + "file4safe.com", "fileband.com", "filedwon.com", "fileparadox.in", + "filevice.com", "hostingbulk.com", "junkyvideo.com", "ravishare.com", "ryushare.com", "salefiles.com", "sendmyway.com", "sharebeast.com", - "sharesix.com", "thefile.me", "verzend.be", "worldbytez.com", "xvidstage.com", + "sharesix.com", "thefile.me", "verzend.be", "worldbytez.com", + "xvidstage.com", #: NOT TESTED: "101shared.com", "4upfiles.com", "filemaze.ws", "filenuke.com", "linkzhost.com", "mightyupload.com", "rockdizfile.com", "sharerepo.com", "shareswift.com", "uploadbaz.com", "uploadc.com", "vidbull.com", "zalaa.com", "zomgupload.com", #: NOT WORKING: - "amonshare.com", "banicrazy.info", "boosterking.com", "host4desi.com", "laoupload.com", "rd-fs.com"] + "amonshare.com", "banicrazy.info", "boosterking.com", "host4desi.com", + "laoupload.com", "rd-fs.com"] CRYPTER_BUILTIN = ["junocloud.me", "rapidfileshare.net"] diff --git a/module/plugins/internal/Captcha.py b/module/plugins/internal/Captcha.py index 600fd1d34..b864fd2d8 100644 --- a/module/plugins/internal/Captcha.py +++ b/module/plugins/internal/Captcha.py @@ -12,7 +12,7 @@ from module.plugins.internal.Plugin import Plugin class Captcha(Plugin): __name__ = "Captcha" __type__ = "captcha" - __version__ = "0.42" + __version__ = "0.43" __status__ = "testing" __description__ = """Base anti-captcha plugin""" @@ -50,18 +50,18 @@ class Captcha(Plugin): pass - def decrypt(self, url, get={}, post={}, ref=False, cookies=False, decode=False, + def decrypt(self, url, get={}, post={}, ref=False, cookies=True, decode=False, input_type='jpg', output_type='textual', ocr=True, timeout=120): img = self.load(url, get=get, post=post, ref=ref, cookies=cookies, decode=decode) return self._decrypt(img, input_type, output_type, ocr, timeout) #@TODO: Definitely choose a better name for this method! - def _decrypt(self, raw, input_type='jpg', output_type='textual', ocr=False, timeout=120): + def _decrypt(self, data, input_type='jpg', output_type='textual', ocr=False, timeout=120): """ Loads a captcha and decrypts it with ocr, plugin, user input - :param raw: image raw data + :param data: image raw data :param get: get part for request :param post: post part for request :param cookies: True if cookies should be enabled @@ -77,7 +77,7 @@ class Captcha(Plugin): time_ref = ("%.2f" % time.time())[-6:].replace(".", "") with open(os.path.join("tmp", "captcha_image_%s_%s.%s" % (self.plugin.__name__, time_ref, input_type)), "wb") as tmp_img: - tmp_img.write(raw) + tmp_img.write(data) if ocr: if isinstance(ocr, basestring): @@ -90,7 +90,7 @@ class Captcha(Plugin): captchaManager = self.pyload.captchaManager try: - self.task = captchaManager.newTask(raw, input_type, tmp_img.name, output_type) + self.task = captchaManager.newTask(data, input_type, tmp_img.name, output_type) captchaManager.handleCaptcha(self.task) |