-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathshecodject.py
68 lines (59 loc) · 1.94 KB
/
shecodject.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
import os
import sys
file = os.getcwd()
sys.path.insert(0,file+'/module')
from core.ui import UI,color
from core.Menu import Menu
from shellcode_path import shellcode
from obfuscation import obshellcode
from msfvenom import msf_origin_raw
from make_exe import exe_options
from listener import msflistener
if __name__ == "__main__":
if not os.path.exists('output/'):
os.mkdir('output')
if not os.path.exists('tmp/'):
os.mkdir('tmp/')
#pathfile
shellcode_temp = ''
msfconsole_rc = ''
shellcode_raw = ''
#initialize
exit_flag = False
ui = UI()
menu = Menu()
Color=color()
#Menu initial
while not exit_flag:
ui.banner()
menu_show = ui.showmenu(menu.options)
choice = input("selected option >>> ")
if choice in menu.allowinput:
mod = None
if choice == 'exit':
exit_flag=True
if choice == 'scc':
mod = shellcode(ui)
mod.do_action(ui.banner)
shellcode_temp = './tmp/'+mod.values['tempfile']
if choice == 'mpr':
mod = msf_origin_raw(ui)
mod.do_action(ui.banner)
shellcode_raw = mod.outraw
shellcode_temp = './tmp/'+mod.values['tempfile']
msfconsole_rc = mod.msfrc
if choice == 'obf':
mod = obshellcode(ui)
mod.values['source'] = shellcode_raw
mod.do_action(ui.banner)
shellcode_temp = './tmp/'+mod.values['tempfile']
if choice == 'exe':
mod = exe_options(ui)
mod.values['source'] = shellcode_temp
mod.do_action(ui.banner)
if choice == 'msf':
mod = msflistener(ui)
mod.values['source'] = msfconsole_rc
mod.do_action(ui.banner)
else:
print(Color.FAIL+"Invalid operation"+Color.ENDC)