Skip to content

Instantly share code, notes, and snippets.

@arthuralvim
Created May 2, 2017 14:14
Show Gist options
  • Save arthuralvim/53b9ed48fd4b3616fc658fa675fb8045 to your computer and use it in GitHub Desktop.
Save arthuralvim/53b9ed48fd4b3616fc658fa675fb8045 to your computer and use it in GitHub Desktop.
Every year activate password reset protocol.
# SAFETY PROTOCOL
from supernice.lib.password import magic_password
from supernice.lib.password import set_mail_new_password
from supernice.lib.password import set_new_recovery_mail
from supernice.lib.password import activate_two_factor_authentication
from supernice.lib.password import activate_google_authenticator
from you.sites import all_sites
def generate_strong_password(super_strong=False):
return magic_password(super_strong)
def change_main_email_password(account, service='hotmail'):
set_mail_new_password(service='hotmail',
password=generate_strong_password(super_strong=True))
if __name__ == '__main__':
account = '[email protected]'
change_main_email_password(account, 'google')
activate_two_factor_authentication(account)
activate_google_authenticator(account)
for site in all_sites:
set_mail_new_password(service=site,
password=generate_strong_password())
set_new_recovery_mail(site, account)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment