-
Notifications
You must be signed in to change notification settings - Fork 2
/
decryptor.py
52 lines (43 loc) · 3.78 KB
/
decryptor.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import zlib
import base64
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_OAEP
encrypted = """XxfaX7nfQ48K+l0rXM3tQf3ShFcytAQ4sLe6vn8bWdreho4riaJ5Dy5PeijSKbsgWSMoeZLmihxb0YAFgCaIp11AUl4kmIiY+c+8LJonbTTembxv98GePM1SEme5/vMwGORJilw+rTdORSHzwbC56sw5NG8KosgLWwHEGEGbhii2qBkuyQrIc9ydoOKKCe0ofTRnaI2c/lb9Ot3vkEIgxCks94H6qVkAfhO34HS7nClUldn9UN040RYgtEqBgvAFzoEhDuRtfjJu1dzyzaFtRAVhcQ6HdgZMWRfpaxKQOmbhXwYyGRQfwNl/Rwgn1EJBFAhvIaEifHDlCw+hLViNYlae7IdfIb6hWtWPyFrkaNjmkbhhXclNgZe0+iPPDzsZbpHI1IckG0gVlTdlGKGz+nK5Cxyso41icC4gO7tmdXDGgF6bMt/GC1VjMVmL/rYsb8jzJblmuQBAeFNacyhjxrzIH5v60RQ1BxwfD+wLCKfyzn3vQucPak2cnwBs3yTIEShYj0ymP4idU/5Qt5qkqMDyvO4U8DmqB4KT58+o2B3c88+lUZjz7c9ygwKjp2hSNf+Dm9H3YJY2Pn6YlydyT1sYWCy06DZko7z3uae5GYGjez8hnCIFt+mpeLvEelSHeZfyV8wYyHg5Y9eA2NZNX6yNVD8IREhjXGWdbGTn41lVCqEiCetY9SKdWeL1Hp/vJN3SOo4qglbQF7P6oqqg0bofnAcphLVaHw/FOGWtW1CFEQUQdIg9bk+SJqM/s1ozJlisenrRzxv3L5LthEfLflCafK0u3n2gPa4F3ok4tx9i+r+MykRTw+OksMfVu71CAMuJdrFQLMSpyWkQ86Vc/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u9m1S
RwKr9C4RSIj38Dv52lbdW8ECgYAXFVcLmn/mATRR9rf9T3J/A8RGyvSk8aNjZaJL
2Xv2mZF7h2F6G+TVoB5OhKtjR8sQQw4D1khgn2gHuLovAsq1USCsTh9FTfQgUDyd
ESP9mBihVWwv0L/YFF7n+RJNYanb91E+IM0kii3u4yhgDZMMts44CfHlGIoeFKIo
f3V9gQKBgE9a1N9Rp8JITrxtDpId3f5N5JSJLZi8FiXL1oiN2bwrI8z/MfVIzJql
YHNeUmY4RndmzGs2P4FfHuTmK6rap0zgK/sPyCmxDa2jwgAgdA8QjThwlP+/SgkZ
ratjZ736aB/15f+Nz+j72sT8gNmbd8T4Qk5K8mpJYC3uHZLkImHo
-----END RSA PRIVATE KEY-----"""
rsakey = RSA.importKey(private_key)
rsakey = PKCS1_OAEP.new(rsakey)
offset = 0
decrypted = ""
encrypted = base64.b64decode(encrypted)
while offset < len(encrypted):
decrypted += rsakey.decrypt(encrypted[offset:offset+256])
offset += 256
# now we decompress to original
plaintext = zlib.decompress(decrypted)
print plaintext