| 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 = [] |