Package: pyopensesame
opensesameAdvanced password generator and hasher made in Python.InstallationFrom PyPI(any OS)python3-mpipinstallopensesameDirectly from GitHub(Linux only)gitclone"https://github.com/jenca-adam/opensesame/"opensesame_buildcdopensesame_build
./setup.shcd..
rm-rfopensesame_buildYou can also usesudo python3 setup.py install, butsetup.shallows local installation.CLIopensesameCLI supports two commands:1.generatefor generating passwords(default)Usage:python-mopensesamegenerate[OPTIONS]Options:-t,--type[chars|characters|c|word|w|pronounceable|p]generationmethodtouse--minINTEGERMinimalnumberofcharactersinpassword(hasnoeffectiftypeisword)--maxINTEGERMaximalnumberofcharactersinpassword(hasnoeffectiftypeisword)-l,--lengthINTEGERPrecisenumberofcharactersinpassword.Overrides--minand--max(hasnoeffectiftypeisword)-s,--number-suffixINTEGERLengthofnumbersuffix-c,--copyUsethistocopythegeneratedpasswordtotheclipboard-h,--hashPrintalsothepasswordhash-a,--algorithm[sha3_384|sha512|blake2b|sha1|sha224|sha3_512|sha256|shake_256|md5|sha384|shake_128|sha3_256|sha3_224|blake2s]Hashingalgorithmtousewith-h.DefaultMD5.(If-hisnotset,hasnoeffect)-L,--lowercaseIftypeischars,addslowercaseASCIItothegenerationset.Thisflagisautomaticallysetifnoneof-U,-D,-S,-A,-Cisset.-U,--uppercaseIftypeischars,addsuppercaseASCIItothegenerationset-D,--digitsIftypeischars,addsdecimaldigitstothegenerationset-S,--symbolsIftypeischars,addsASCIIsymbolstothegenerationset-A,--allIftypeischars,addsallgroupstothegenerationset-C,--copy-hashUsethistocopythegeneratedhashtoclipboard.Hasnoeffectif-hisnotset.-n,--numberINTEGERNumberofpasswordstogenerate-i,--infiniteConstantlygeneratespasswords.Overrides-n.--helpShowthismessageandexit.2.hashfor hashing passwords.Usage:python-mopensesamehash[OPTIONS]Options:-i,--inputFILENAMEInputtoreadfrom.Defaultisstdin-o,--outputFILENAMEOutputtowriteto.Defaultisstdout-a,--algorithm[sha224|blake2b|sha3_384|sha384|blake2s|sha1|shake_128|sha3_224|sha512|sha3_256|sha3_512|sha256|md5|shake_256]Hashingalgorithmtouse.DefaultMD5-b,--bytes-digestOutputnormaldigestinsteadofhexdigest.-r,--reprIf-bisset,outputsPythoninternalstringrepresentationofbytesoutput--helpShowthismessageandexit.Python libGeneration methodsopensesameAdvanced password generator and hasher made in Python.InstallationFrom PyPI(any OS)python3-mpipinstallopensesameDirectly from GitHub(Linux only)gitclone"https://github.com/jenca-adam/opensesame/"opensesame_buildcdopensesame_build
./setup.shcd..
rm-rfopensesame_buildYou can also usesudo python3 setup.py install, butsetup.shallows local installation.CLIopensesameCLI supports two commands:1.generatefor generating passwords(default)Usage:python-mopensesamegenerate[OPTIONS]Options:-t,--type[chars|characters|c|word|w|pronounceable|p]generationmethodtouse--minINTEGERMinimalnumberofcharactersinpassword(hasnoeffectiftypeisword)--maxINTEGERMaximalnumberofcharactersinpassword(hasnoeffectiftypeisword)-l,--lengthINTEGERPrecisenumberofcharactersinpassword.Overrides--minand--max(hasnoeffectiftypeisword)-s,--number-suffixINTEGERLengthofnumbersuffix-c,--copyUsethistocopythegeneratedpasswordtotheclipboard-h,--hashPrintalsothepasswordhash-a,--algorithm[sha3_384|sha512|blake2b|sha1|sha224|sha3_512|sha256|shake_256|md5|sha384|shake_128|sha3_256|sha3_224|blake2s]Hashingalgorithmtousewith-h.DefaultMD5.(If-hisnotset,hasnoeffect)-L,--lowercaseIftypeischars,addslowercaseASCIItothegenerationset.Thisflagisautomaticallysetifnoneof-U,-D,-S,-A,-Cisset.-U,--uppercaseIftypeischars,addsuppercaseASCIItothegenerationset-D,--digitsIftypeischars,addsdecimaldigitstothegenerationset-S,--symbolsIftypeischars,addsASCIIsymbolstothegenerationset-A,--allIftypeischars,addsallgroupstothegenerationset-C,--copy-hashUsethistocopythegeneratedhashtoclipboard.Hasnoeffectif-hisnotset.-n,--numberINTEGERNumberofpasswordstogenerate-i,--infiniteConstantlygeneratespasswords.Overrides-n.--helpShowthismessageandexit.2.hashfor hashing passwords.Usage:python-mopensesamehash[OPTIONS]Options:-i,--inputFILENAMEInputtoreadfrom.Defaultisstdin-o,--outputFILENAMEOutputtowriteto.Defaultisstdout-a,--algorithm[sha224|blake2b|sha3_384|sha384|blake2s|sha1|shake_128|sha3_224|sha512|sha3_256|sha3_512|sha256|md5|shake_256]Hashingalgorithmtouse.DefaultMD5-b,--bytes-digestOutputnormaldigestinsteadofhexdigest.-r,--reprIf-bisset,outputsPythoninternalstringrepresentationofbytesoutput--helpShowthismessageandexit.Python libGeneration methodscharsThis generates a password of a given length randomly selecting from the given character sets. Character sets are:lowercase-> lower case ascii charsuppercase-> UPPER CASE ASCII CHARSdigits-> 0123456789symbols->!"#$%&'()+,*-./:;<=>?@[]^_`{|}~all-> everything above
Character sets are added by setting kwarg<CHARSET_NAME>toTrue.
If no character sets are specified, only lowercase is used.You can specify length usinglength,minandmaxatributtes, wherelengthoverrides the boundaries(minandmax).
Default length is picked between 6 and 20.:warning: Be careful! Don't select only one boundary, as it might causeIndexError.You can also generate a pronounciable password by settingpronounciabletoTrue.
Character sets don't apply to pronounciable passwords.wordThis just selects a random word from the wordlist.
No attributes fromcharsapply to this.passgenWithpassgen,you can select a method and call the method with given**kwargs.It's just a wrapper.The methods are selected by setting the first arg ofpassgentochars,wordorpronounciable. You can also set it to the first char of their name.number_suffixchars,wordandpassgenall have the argumentnumber_suffix. It specifies how many digits are supposed to be added to the end of the password.PasswordobjectGeneration methods return this.It's a string wrapped in hashing.
Hashing is done withPassword.hash(algorithm).Password.hashreturnsHashobject with attributeshexdigest(hexadecimal representation of the digest) andbytesdigest(actual digest)charsThis generates a password of a given length randomly selecting from the given character sets. Character sets are:lowercase-> lower case ascii charsuppercase-> UPPER CASE ASCII CHARSdigits-> 0123456789symbols->!"#$%&'()+,*-./:;<=>?@[]^_`{|}~all-> everything above
Character sets are added by setting kwarg<CHARSET_NAME>toTrue.
If no character sets are specified, only lowercase is used.You can specify length usinglgit clone git@github.com:YOUR-USERNAME/warehouse.gitength,minandmaxatributtes, wherelengthoverrides the boundaries(minandmax).
Default length is picked between 6 and 20.:warning: Be careful! Don't select only one boundary, as it might causeIndexError.You can also generate a pronounciable password by settingpronounciabletoTrue.
Character sets don't apply to pronounciable passwords.wordThis just selects a random word from the wordlist.
No attributes fromcharsapply to this.passgenWithpassgen,you can select a method and call the method with given**kwargs.It's just a wrapper.The methods are selected by setting the first arg ofpassgentochars,wordorpronounciable. You can also set it to the first char of their name.number_suffixchars,wordandpassgenall have the argumentnumber_suffix. It specifies how many digits are supposed to be added to the end of the password.PasswordobjectGeneration methods return this.It's a string wrapped in hashing.
Hashing is done withPassword.hash(algorithm).Password.hashreturnsHashobject with attributeshexdigest(hexadecimal representation of the digest) andbytesdigest(actual digest)