# -*- coding: utf-8 -*- from Crypto.Cipher import AES from module.plugins.Crypter import Crypter import base64 import binascii import re class NCryptIn(Crypter): __name__ = "NCryptIn" __type__ = "crypter" __pattern__ = r"http://(?:www\.)?ncrypt.in/folder-([^/\?]+)" __version__ = "1.0" __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 def decrypt(self, pyfile): # Init self.pyfile = pyfile self.package = pyfile.package() # Request package self.html = self.requestPackage() if not self.isOnline(): self.offline() # Check for password protection if self.isPasswordProtected(): self.html = self.submitPassword() if self.html is None: self.fail("Incorrect password, please set right password on Edit package form and retry") # Get package name and folder (package_name, folder_name) = self.getPackageInfo() # Get package links try: package_links = [] (vcrypted, vjk) = self.getCipherParams() for (crypted, jk) in zip(vcrypted, vjk): package_links = package_links + self.getLinks(crypted, jk) except: self.fail("Unable to decrypt package") # Pack self.packages = [(package_name, package_links, folder_name)] def isOnline(self): if "Your folder does not exist" in self.html: self.log.debug("NCryptIn: File not found") return False return True def isPasswordProtected(self): p1 = r'''