# -*- coding: utf-8 -*- import base64 import binascii import re from Crypto.Cipher import AES from module.plugins.Crypter import Crypter from module.plugins.ReCaptcha import ReCaptcha class NCryptIn(Crypter): __name__ = "NCryptIn" __type__ = "crypter" __pattern__ = r"http://(?:www\.)?ncrypt.in/folder-([^/\?]+)" __version__ = "1.23" __description__ = """NCrypt.in Crypter Plugin""" __author_name__ = ("fragonib") __author_mail__ = ("fragonib[AT]yahoo[DOT]es") # Constants _JK_KEY_ = "jk" _CRYPTED_KEY_ = "crypted" def setup(self): self.html = None self.cleanedHtml = None self.captcha = False self.package = None def decrypt(self, pyfile): # Init self.package = pyfile.package() # Request package self.html = self.load(self.pyfile.url) self.cleanedHtml = self.removeCrap(self.html) if not self.isOnline(): self.offline() # Check for protection if self.isProtected(): self.html = self.unlockProtection() self.cleanedHtml = self.removeCrap(self.html) self.handleErrors() # Get package name and folder (package_name, folder_name) = self.getPackageInfo() # Extract package links package_links = [] package_links.extend(self.handleWebLinks()) package_links.extend(self.handleContainers()) package_links.extend(self.handleCNL2()) package_links = self.removeContainers(package_links) package_links = set(package_links) # Pack self.packages = [(package_name, package_links, folder_name)] def removeCrap(self, content): patterns = (r'(type="hidden".*?(name=".*?")?.*?value=".*?")', r'display:none;">(.*?)(div|span)>', r'