Welcome to the Pythonista Community Forums!

Pythonista is a Python programming environment for iOS. To learn more, head over to the Pythonista Website.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Twitter
Password generator
  • Takes URL from clipboard

    Prompts for master password

    Generates password to clipboard



    import hashlib,clipboard
    from urlparse import urlparse

    ad= clipboard.get()

    url = urlparse(ad)
    hst= url.hostname

    i = hst.split('.', 1)
    subdomain = i[1]



    print "enter password"
    salt = sys.stdin.readline()

    hash = hashlib.md5( salt + subdomain ).hexdigest()



    hash1="C!"+hash[0:8]


    clipboard.set(hash1)

    print "%s:%s" % (subdomain, " Captured to clipboard")