-
Notifications
You must be signed in to change notification settings - Fork 1
/
uma.py
54 lines (43 loc) · 1.32 KB
/
uma.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
53
54
import base64
import zlib
import urllib.request
from colorama import Fore, Style
print(Fore.RED)
print("""
_ _ _ __ ___ __ _ _ __ _ _ _ __
| | | | '_ ` _ \ / _` | '__| | | | '_ \
| |_| | | | | | | (_| | | | |_| | | | |
\__,_|_| |_| |_|\__,_|_| \__,_|_| |_|
""")
print(Style.RESET_ALL)
print ("Umarun - unMarshal\n")
print ("1. find b64bytecode")
print ("2. redacted b64bytecode")
print ("3. gotta flag")
print (30 * '-')
choice = input('args [1-3] : ')
choice = int(choice)
### Take
if choice == 1:
url = input('raw paste: ')
file = urllib.request.urlopen(url) # nosec
for line in file:
decoded_line = line.decode("utf-8")
print(decoded_line)
rubbishword = decoded_line
b64 = base64.b64decode(rubbishword)
print(b64)
elif choice == 2:
url = input('raw paste: ')
file = urllib.request.urlopen(url) # nosec
for line in file:
decoded_line = line.decode("utf-8")
print(decoded_line)
rubbishword = decoded_line
b64 = base64.b64decode(rubbishword)
goblok = zlib.decompress(b64)
print(goblok)
elif choice == 3:
print('Pls use redacted instead')
else: ## default ##
print ("Invalid number")