Skip to content

Instantly share code, notes, and snippets.

@paxswill
Last active August 29, 2015 14:01
Show Gist options
  • Save paxswill/177eb64261c7c0247500 to your computer and use it in GitHub Desktop.
Save paxswill/177eb64261c7c0247500 to your computer and use it in GitHub Desktop.
from brave.core.key.model import EVECredential
def delete(delete=False):
""" Deletes every key from before the leak from the database."""
query = EveCredential.objects(key__lt=3283828)
count = query.count()
keys = query.scalar('key')
keys = '\n'.join(keys)
print keys
if delete:
EVECredential.objects(key__lt=3283828).delete()
print "Deleted {0} keys.".format(count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment