diff options
Diffstat (limited to 'module/plugins/crypter/LinkSaveIn.py')
-rw-r--r-- | module/plugins/crypter/LinkSaveIn.py | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py index 5a72b750a..ac64acf3e 100644 --- a/module/plugins/crypter/LinkSaveIn.py +++ b/module/plugins/crypter/LinkSaveIn.py @@ -64,24 +64,24 @@ class LinkSaveIn(Crypter): def isOnline(self):
if "<big>Error 404 - Folder not found!</big>" in self.html:
- self.log.debug("%s: File not found" % self.__name__)
+ self.logDebug("File not found")
return False
return True
def isPasswordProtected(self):
if re.search(r'''<input.*?type="password"''', self.html):
- self.log.debug("%s: Links are password protected" % self.__name__)
+ self.logDebug("Links are password protected")
return True
def isCaptchaProtected(self):
if "<b>Captcha:</b>" in self.html:
- self.log.debug("%s: Links are captcha protected" % self.__name__)
+ self.logDebug("Links are captcha protected")
return True
return False
def unlockPasswordProtection(self):
password = self.getPassword()
- self.log.debug("%s: Submitting password [%s] for protected links" % (self.__name__, password))
+ self.logDebug("Submitting password [%s] for protected links" % password)
post = {"id": self.fileid, "besucherpasswort": password, 'login': 'submit'}
self.html = self.load(self.pyfile.url, post=post)
@@ -94,17 +94,17 @@ class LinkSaveIn(Crypter): def getPackageInfo(self):
name = self.pyfile.package().name
folder = self.pyfile.package().folder
- self.log.debug("%s: Defaulting to pyfile name [%s] and folder [%s] for package" % (self.__name__, name, folder))
+ self.logDebug("Defaulting to pyfile name [%s] and folder [%s] for package" % (name, folder))
return name, folder
def handleErrors(self):
if "The visitorpassword you have entered is wrong" in self.html:
- self.log.debug("%s: Incorrect password, please set right password on 'Edit package' form and retry" % self.__name__)
+ self.logDebug("Incorrect password, please set right password on 'Edit package' form and retry")
self.fail("Incorrect password, please set right password on 'Edit package' form and retry")
if self.captcha:
if "Wrong code. Please retry" in self.html:
- self.log.debug("%s: Invalid captcha, retrying" % self.__name__)
+ self.logDebug("Invalid captcha, retrying")
self.invalidCaptcha()
self.retry()
else:
@@ -112,36 +112,36 @@ class LinkSaveIn(Crypter): def handleWebLinks(self):
package_links = []
- self.log.debug("%s: Handling Web links" % self.__name__)
+ self.logDebug("Handling Web links")
#@TODO: Gather paginated web links
pattern = r'<a href="http://linksave\.in/(\w{43})"'
ids = re.findall(pattern, self.html)
- self.log.debug("%s: Decrypting %d Web links" % (self.__name__, len(ids)))
+ self.logDebug("Decrypting %d Web links" % len(ids))
for i, id in enumerate(ids):
try:
webLink = "http://linksave.in/%s" % id
- self.log.debug("%s: Decrypting Web link %d, %s" % (self.__name__, i+1, webLink))
+ self.logDebug("Decrypting Web link %d, %s" % (i+1, webLink))
fwLink = "http://linksave.in/fw-%s" % id
response = self.load(fwLink)
jscode = re.findall(r'<script type="text/javascript">(.*)</script>', response)[-1]
jseval = self.js.eval("document = { write: function(e) { return e; } }; %s" % jscode)
dlLink = re.search(r'http://linksave\.in/dl-\w+', jseval).group(0)
- self.log.debug("%s: JsEngine returns value [%s] for redirection link" % (self.__name__, dlLink))
+ self.logDebug("JsEngine returns value [%s] for redirection link" % dlLink)
response = self.load(dlLink)
link = unescape(re.search(r'<iframe src="(.+?)"', response).group(1))
package_links.append(link)
except Exception, detail:
- self.log.debug("%s: Error decrypting Web link %s, %s" % (self.__name__, webLink, detail))
+ self.logDebug("Error decrypting Web link %s, %s" % (webLink, detail))
return package_links
def handleContainers(self):
package_links = []
- self.log.debug("%s: Handling Container links" % self.__name__)
+ self.logDebug("Handling Container links")
pattern = r"\('(?:rsdf|ccf|dlc)_link'\).href=unescape\('(.*?\.(?:rsdf|ccf|dlc))'\)"
containersLinks = re.findall(pattern, self.html)
- self.log.debug("%s: Decrypting %d Container links" % (self.__name__, len(containersLinks)))
+ self.logDebug("Decrypting %d Container links" % len(containersLinks))
for containerLink in containersLinks:
link = "http://linksave.in/%s" % unescape(containerLink)
package_links.append(link)
@@ -149,7 +149,7 @@ class LinkSaveIn(Crypter): def handleCNL2(self):
package_links = []
- self.log.debug("%s: Handling CNL2 links" % self.__name__)
+ self.logDebug("Handling CNL2 links")
if 'cnl2_load' in self.html:
try:
@@ -171,14 +171,14 @@ class LinkSaveIn(Crypter): vcrypted = re.findall(crypted_re, self.html)
# Log and return
- self.log.debug("%s: Detected %d crypted blocks" % (self.__name__, len(vcrypted)))
+ self.logDebug("Detected %d crypted blocks" % len(vcrypted))
return vcrypted, vjk
def _getLinks(self, crypted, jk):
# Get key
jreturn = self.js.eval("%s f()" % jk)
- self.log.debug("%s: JsEngine returns value [%s]" % (self.__name__, jreturn))
+ self.logDebug("JsEngine returns value [%s]" % jreturn)
key = binascii.unhexlify(jreturn)
# Decode crypted
@@ -196,5 +196,5 @@ class LinkSaveIn(Crypter): links = filter(lambda x: x != "", links)
# Log and return
- self.log.debug("%s: Package has %d links" % (self.__name__, len(links)))
+ self.logDebug("Package has %d links" % len(links))
return links
|