def team_file_share(self, user, file_upload): ''' Callback when a team file share is created ''' message = "%s has shared a file called '%s'" % ( user.handle, file_upload.file_name, ) evt_id = Notifier.team_success(user.team, "File Share", message) self.push_team_notification(evt_id, user.team.id)
def create_paste_bin_event(self, user, paste): ''' Callback when a pastebin is created ''' message = "%s posted to the team paste-bin" % user.handle evt_id = Notifier.team_success(user.team, "Text Share", message) return (self.push_team_notification, { 'event_uuid': evt_id, 'team_id': user.team.id })
def create_joined_team_event(self, user): ''' Callback when a user joins a team''' message = "%s has joined your team." % user.handle evt_id = Notifier.team_success(user.team, "New Team Member", message) return (self.push_team_notification, { 'event_uuid': evt_id, 'team_id': user.team.id })
def create_purchased_item_event(self, user, item): """ Callback when a team purchases an item """ self.refresh_scoreboard() message = "%s purchased %s from the black market." % (user.handle, item.name) evt_id = Notifier.team_success(user.team, "Upgrade Purchased", message) self.push_broadcast_notification(evt_id) message2 = "%s unlocked %s." % (user.team.name, item.name) evt_id2 = Notifier.broadcast_warning("Team Upgrade", message2) return (self.push_broadcast_notification, {"event_uuid": evt_id2})
def create_team_file_share_event(self, user, file_upload): ''' Callback when a team file share is created ''' message = "%s has shared a file called '%s'" % ( user.handle, file_upload.file_name, ) evt_id = Notifier.team_success(user.team, "File Share", message) return (self.push_team_notification, { 'event_uuid':evt_id, 'team_id':user.team.id })
def create_team_file_share_event(self, user, file_upload): ''' Callback when a team file share is created ''' message = "%s has shared a file called '%s'" % ( user.handle, file_upload.file_name, ) evt_id = Notifier.team_success(user.team, "File Share", message) return (self.push_team_notification, { 'event_uuid': evt_id, 'team_id': user.team.id })
def purchased_item(self, user, item): ''' Callback when a team purchases an item ''' self.refresh_scoreboard() message = "%s purchased %s from the black market." % ( user.handle, item.name, ) evt_id = Notifier.team_success(user.team, "Upgrade Purchased", message) self.push_broadcast_notification(evt_id) message2 = "%s unlocked %s." % (user.team.name, item.name,) evt_id2 = Notifier.broadcast_warning("Team Upgrade", message2) self.push_broadcast_notification(evt_id2)
def create_purchased_item_event(self, user, item): ''' Callback when a team purchases an item ''' self.refresh_scoreboard() message = "%s purchased %s from the black market." % ( user.handle, item.name, ) evt_id = Notifier.team_success(user.team, "Upgrade Purchased", message) self.push_broadcast_notification(evt_id) message2 = "%s unlocked %s." % ( user.team.name, item.name, ) evt_id2 = Notifier.broadcast_warning("Team Upgrade", message2) return (self.push_broadcast_notification, {'event_uuid': evt_id2})
def paste_bin(self, user, paste): ''' Callback when a pastebin is created ''' message = "%s posted to the team paste-bin" % user.handle evt_id = Notifier.team_success(user.team, "Text Share", message) self.push_team_notification(evt_id, user.team.id)
def joined_team(self, user): ''' Callback when a user joins a team''' message = "%s has joined your team." % user.handle evt_id = Notifier.team_success(user.team, "New Team Member", message) self.push_team_notification(evt_id, user.team.id)
def new_bot(self, bot): message = "New bot connected to botnet from %s " % (bot.box.name,) evt_id = Notifier.team_success(bot.team, "Botnet", message) self.push_team_notification(evt_id)