MCPcopy Index your code
hub / github.com/pyload/pyload / handle_CNL

Method handle_CNL

module/plugins/crypter/CriptTo.py:158–180  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

156 self.fail(_("Wrong password"))
157
158 def handle_CNL(self):
159 links = []
160
161 m = re.search(self.CNL_LINK_PATTERN, self.data)
162 if m is not None:
163 html = self.load(m.group(1))
164 _, inputs = parse_html_form("/flash/", html)
165 if inputs is not None:
166 #: Get key
167 key = binascii.unhexlify(re.search(r"'(\w+)'", inputs['jk']).group(1))
168 crypted = inputs['crypted']
169
170 #: Decrypt
171 #Key = key
172 #IV = key
173 obj = Crypto.Cipher.AES.new(key, Crypto.Cipher.AES.MODE_CBC, key)
174 text = obj.decrypt(crypted.decode('base64'))
175
176 #: Extract links
177 text = text.replace("\x00", "").replace("\r", "")
178 links = filter(bool, text.split('\n'))
179
180 return links
181
182 def handle_weblinks(self):
183 links = []

Callers

nothing calls this directly

Calls 9

parse_html_formFunction · 0.85
filterFunction · 0.85
decodeMethod · 0.80
splitMethod · 0.80
searchMethod · 0.45
loadMethod · 0.45
newMethod · 0.45
decryptMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected