forked from Ch0pin/medusa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmedusa.py
executable file
·69 lines (52 loc) · 2.24 KB
/
medusa.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env python3
import readline
import os
import cmd
import click
from libraries.defs import *
p = parser()
try:
if len(sys.argv) > 1:
data = ''
if '-r' in sys.argv[1]:
print('[+] Loading a recipe....')
with open(sys.argv[2],'r') as file:
for line in file:
if "modules/" in line:
module = line[:-1]
print('- Loading {}'.format(module))
p.module_list.append(module)
else:
data += line
p.modified = True
if data != '':
print("[+] Writing to scratchpad...")
with open('modules/scratchpad.med','w') as file:
file.write(data)
except Exception as e:
print(e)
click.secho("""
Welcome to:
███▄ ▄███▓▓█████ ▓█████▄ █ ██ ██████ ▄▄▄
▓██▒▀█▀ ██▒▓█ ▀ ▒██▀ ██▌ ██ ▓██▒▒██ ▒ ▒████▄
▓██ ▓██░▒███ ░██ █▌▓██ ▒██░░ ▓██▄ ▒██ ▀█▄
▒██ ▒██ ▒▓█ ▄ ░▓█▄ ▌▓▓█ ░██░ ▒ ██▒░██▄▄▄▄██
▒██▒ ░██▒░▒████▒░▒████▓ ▒▒█████▓ ▒██████▒▒ ▓█ ▓██▒
░ ▒░ ░ ░░░ ▒░ ░ ▒▒▓ ▒ ░▒▓▒ ▒ ▒ ▒ ▒▓▒ ▒ ░ ▒▒ ▓▒█░
░ ░ ░ ░ ░ ░ ░ ▒ ▒ ░░▒░ ░ ░ ░ ░▒ ░ ░ ▒ ▒▒ ░
░ ░ ░ ░ ░ ░ ░░░ ░ ░ ░ ░ ░ ░ ▒
░ ░ ░ ░ ░ ░ ░ ░\n\n\n Type help for options\n\n""",fg='green')
try:
print('Availlable devices:\n')
devices = frida.enumerate_devices()
i = 0
for dv in devices:
print('{}) {}'.format(i,dv))
i += 1
j = input('\nEnter the index of device to use:')
device = devices[int(j)]
except:
device = frida.get_remote_device()
p.device = device
p.init_packages()
p.cmdloop()