#!/usr/bin/python # -*- coding: utf-8 -*- from os import urandom charsets={ "a":"abcdefghijklmnopqrstuvwxyz",\ "A":"ABCDEFGHIJKLMNOPQRSTUVWXYZ",\ "0":"0123456789",\ "$":"^!\"$%&/()=?{[]}+*~#'-_.:,;<>|\\ "\ } def GeneratePassword(length=5,charset="aA0"): password="";lc="";charset_string="" for c in charset: if c in charsets.keys(): charset_string+=charsets[c] while len(password)