summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r--module/plugins/crypter/C1neonCom.py6
-rw-r--r--module/plugins/crypter/FilefactoryComFolder.py12
-rw-r--r--module/plugins/crypter/FourChanOrg.py2
-rw-r--r--module/plugins/crypter/LinkdecrypterCom.py33
-rw-r--r--module/plugins/crypter/MegaCoNzFolder.py9
-rw-r--r--module/plugins/crypter/Movie2kTo.py6
-rw-r--r--module/plugins/crypter/OneKhDe.py3
-rw-r--r--module/plugins/crypter/SafelinkingNet.py4
-rw-r--r--module/plugins/crypter/XFileSharingProFolder.py15
9 files changed, 37 insertions, 53 deletions
diff --git a/module/plugins/crypter/C1neonCom.py b/module/plugins/crypter/C1neonCom.py
index bc58fbf1c..926633ff7 100644
--- a/module/plugins/crypter/C1neonCom.py
+++ b/module/plugins/crypter/C1neonCom.py
@@ -3,8 +3,8 @@
from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
-class C1neonCom(DeadCrypter):
- __name__ = "C1neonCom"
+class C1NeonCom(DeadCrypter):
+ __name__ = "C1NeonCom"
__type__ = "crypter"
__version__ = "0.05"
@@ -16,4 +16,4 @@ class C1neonCom(DeadCrypter):
__authors__ = [("godofdream", "soilfiction@gmail.com")]
-getInfo = create_getInfo(C1neonCom)
+getInfo = create_getInfo(C1NeonCom)
diff --git a/module/plugins/crypter/FilefactoryComFolder.py b/module/plugins/crypter/FilefactoryComFolder.py
index 26e28acbd..261c7e01a 100644
--- a/module/plugins/crypter/FilefactoryComFolder.py
+++ b/module/plugins/crypter/FilefactoryComFolder.py
@@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class FilefactoryComFolder(SimpleCrypter):
__name__ = "FilefactoryComFolder"
__type__ = "crypter"
- __version__ = "0.31"
+ __version__ = "0.32"
__pattern__ = r'https?://(?:www\.)?filefactory\.com/(?:f|folder)/\w+'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
@@ -17,15 +17,15 @@ class FilefactoryComFolder(SimpleCrypter):
__authors__ = [("stickell", "l.stickell@yahoo.it")]
- LINK_PATTERN = r'<td><a href="([^"]+)">'
- NAME_PATTERN = r'<h1>Files in <span>(?P<N>.+)</span></h1>'
- PAGES_PATTERN = r'data-paginator-totalPages="(\d+)"'
-
COOKIES = [("filefactory.com", "locale", "en_US.utf8")]
+ LINK_PATTERN = r'<td>\s*<a href="(.+?)"'
+ NAME_PATTERN = r'<h1>Files in <span>(?P<N>.+?)<'
+ PAGES_PATTERN = r'data-paginator-totalPages="(\d+)'
+
def loadPage(self, page_n):
- return self.load(self.pyfile.url, get={'page': page_n})
+ return self.load(self.pyfile.url, get={'page': page_n, 'show': 100})
getInfo = create_getInfo(FilefactoryComFolder)
diff --git a/module/plugins/crypter/FourChanOrg.py b/module/plugins/crypter/FourChanOrg.py
index d6c5c86cc..c3fe3db4b 100644
--- a/module/plugins/crypter/FourChanOrg.py
+++ b/module/plugins/crypter/FourChanOrg.py
@@ -10,7 +10,7 @@ from module.plugins.Crypter import Crypter
class FourChanOrg(Crypter):
__name__ = "FourChanOrg"
__type__ = "crypter"
- __version__ = "0.30"
+ __version__ = "0.31"
__pattern__ = r'http://(?:www\.)?boards\.4chan\.org/\w+/res/(\d+)'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py
index 7eb5d3096..7f24784c7 100644
--- a/module/plugins/crypter/LinkdecrypterCom.py
+++ b/module/plugins/crypter/LinkdecrypterCom.py
@@ -7,7 +7,7 @@ from module.plugins.Crypter import Crypter
class LinkdecrypterCom(Crypter):
__name__ = "LinkdecrypterCom"
__type__ = "crypter"
- __version__ = "0.28"
+ __version__ = "0.29"
__pattern__ = r'^unmatchable$'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
@@ -31,40 +31,15 @@ class LinkdecrypterCom(Crypter):
def decrypt(self, pyfile):
- # API not working anymore
- self.urls = self.decryptHTML()
-
-
- def decryptAPI(self):
- get_dict = {"t": "link", "url": self.pyfile.url, "lcache": "1"}
- self.html = self.load('http://linkdecrypter.com/api', get=get_dict)
- if self.html.startswith('http://'):
- return self.html.splitlines()
-
- if self.html == 'INTERRUPTION(PASSWORD)':
- get_dict['pass'] = self.password
-
- self.html = self.load('http://linkdecrypter.com/api', get=get_dict)
- if self.html.startswith('http://'):
- return self.html.splitlines()
-
- self.logError("API", self.html)
- if self.html == 'INTERRUPTION(PASSWORD)':
- self.fail(_("No or incorrect password"))
-
- return None
-
-
- def decryptHTML(self):
retries = 5
- post_dict = {"link_cache": "on", "pro_links": self.pyfile.url, "modo_links": "text"}
+ post_dict = {"link_cache": "on", "pro_links": pyfile.url, "modo_links": "text"}
self.html = self.load('http://linkdecrypter.com/', post=post_dict, cookies=True, decode=True)
while retries:
m = re.search(self.TEXTAREA_PATTERN, self.html, flags=re.S)
if m:
- return [x for x in m.group(1).splitlines() if '[LINK-ERROR]' not in x]
+ self.urls = [x for x in m.group(1).splitlines() if '[LINK-ERROR]' not in x]
m = re.search(self.CAPTCHA_PATTERN, self.html)
if m:
@@ -91,5 +66,3 @@ class LinkdecrypterCom(Crypter):
else:
retries -= 1
self.html = self.load('http://linkdecrypter.com/', cookies=True, decode=True)
-
- return None
diff --git a/module/plugins/crypter/MegaCoNzFolder.py b/module/plugins/crypter/MegaCoNzFolder.py
index caa2ab563..bec4eba22 100644
--- a/module/plugins/crypter/MegaCoNzFolder.py
+++ b/module/plugins/crypter/MegaCoNzFolder.py
@@ -1,14 +1,16 @@
# -*- coding: utf-8 -*-
+import re
+
from module.plugins.internal.Crypter import Crypter
class MegaCoNzFolder(Crypter):
__name__ = "MegaCoNzFolder"
__type__ = "crypter"
- __version__ = "0.02"
+ __version__ = "0.03"
- __pattern__ = r'https?://(?:www\.)?mega\.co\.nz/#F![\w+^_]![\w,\\-]+'
+ __pattern__ = r'(?:https?://(?:www\.)?mega\.co\.nz/|mega:|chrome:.+?)#F!(?P<ID>[\w+^_])!(?P<KEY>[\w,\\-]+)'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
("subfolder_per_package", "bool", "Create a subfolder for each package", True)]
@@ -22,7 +24,8 @@ class MegaCoNzFolder(Crypter):
def decrypt(self, pyfile):
- self.html = self.load("http://rapidgen.org/linkfinder", post={'linklisturl': self.pyfile.url})
+ url = "https://mega.co.nz/#F!%s!%s" % re.match(self.__pattern__, pyfile.url).groups()
+ self.html = self.load("http://rapidgen.org/linkfinder", post={'linklisturl': url})
self.urls = re.findall(r'(https://mega.co.nz/#N!.+?)<', self.html)
if not self.urls: #@TODO: Remove in 0.4.10
diff --git a/module/plugins/crypter/Movie2kTo.py b/module/plugins/crypter/Movie2kTo.py
index 7d71950fd..76bf702ac 100644
--- a/module/plugins/crypter/Movie2kTo.py
+++ b/module/plugins/crypter/Movie2kTo.py
@@ -3,8 +3,8 @@
from module.plugins.internal.DeadCrypter import DeadCrypter, create_getInfo
-class Movie2kTo(DeadCrypter):
- __name__ = "Movie2kTo"
+class Movie2KTo(DeadCrypter):
+ __name__ = "Movie2KTo"
__type__ = "crypter"
__version__ = "0.51"
@@ -16,4 +16,4 @@ class Movie2kTo(DeadCrypter):
__authors__ = [("4Christopher", "4Christopher@gmx.de")]
-getInfo = create_getInfo(Movie2kTo)
+getInfo = create_getInfo(Movie2KTo)
diff --git a/module/plugins/crypter/OneKhDe.py b/module/plugins/crypter/OneKhDe.py
index cfb084da8..3e75d97b5 100644
--- a/module/plugins/crypter/OneKhDe.py
+++ b/module/plugins/crypter/OneKhDe.py
@@ -3,13 +3,14 @@
import re
from module.unescape import unescape
+
from module.plugins.Crypter import Crypter
class OneKhDe(Crypter):
__name__ = "OneKhDe"
__type__ = "crypter"
- __version__ = "0.10"
+ __version__ = "0.11"
__pattern__ = r'http://(?:www\.)?1kh\.de/f/'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py
index 709083b51..a56a0a44c 100644
--- a/module/plugins/crypter/SafelinkingNet.py
+++ b/module/plugins/crypter/SafelinkingNet.py
@@ -14,7 +14,7 @@ from module.plugins.internal.CaptchaService import SolveMedia
class SafelinkingNet(Crypter):
__name__ = "SafelinkingNet"
__type__ = "crypter"
- __version__ = "0.11"
+ __version__ = "0.13"
__pattern__ = r'https?://(?:www\.)?safelinking\.net/([pd])/\w+'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
@@ -42,6 +42,8 @@ class SafelinkingNet(Crypter):
else:
postData = {"post-protect": "1"}
+ self.html = self.load(url)
+
if "link-password" in self.html:
postData['link-password'] = self.getPassword()
diff --git a/module/plugins/crypter/XFileSharingProFolder.py b/module/plugins/crypter/XFileSharingProFolder.py
index 10e4d8c83..55cd41931 100644
--- a/module/plugins/crypter/XFileSharingProFolder.py
+++ b/module/plugins/crypter/XFileSharingProFolder.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo
class XFileSharingProFolder(XFSCrypter):
__name__ = "XFileSharingProFolder"
__type__ = "crypter"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'^unmatchable$'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
@@ -30,21 +30,26 @@ class XFileSharingProFolder(XFSCrypter):
self.__pattern__ = self.core.pluginManager.crypterPlugins[self.__name__]['pattern']
- self.HOSTER_DOMAIN = re.match(self.__pattern__, self.pyfile.url).group(1).lower()
- self.HOSTER_NAME = "".join([str.capitalize() for str in self.HOSTER_DOMAIN.split('.')])
+ self.HOSTER_DOMAIN = re.match(self.__pattern__, self.pyfile.url).group("DOMAIN").lower()
+ self.HOSTER_NAME = "".join([part.capitalize() for part in re.split(r'(\.|\d+)', self.HOSTER_DOMAIN) if part != '.'])
+
+ if self.HOSTER_NAME[0].isdigit():
+ self.HOSTER_NAME = 'X' + self.HOSTER_NAME
account = self.core.accountManager.getAccountPlugin(self.HOSTER_NAME)
if account and account.canUse():
self.account = account
+
elif self.account:
self.account.HOSTER_DOMAIN = self.HOSTER_DOMAIN
+
else:
return
self.user, data = self.account.selectAccount()
- self.req = self.account.getAccountRequest(self.user)
- self.premium = self.account.isPremium(self.user)
+ self.req = self.account.getAccountRequest(self.user)
+ self.premium = self.account.isPremium(self.user)
getInfo = create_getInfo(XFileSharingProFolder)