Package: hpass
Hello PasswordA very simple secure password management tool.Why?Because I can't believe the current password management software. In addition, the fact that the data file cannot be exported bothers me.Quick StartUsehpass -hview detailed commands$hpass-husage:hpass[-h][-v][-rPASSWORD_LENGTH][-i][-c]HelloPasswordoptionalarguments:-h,--helpshowthishelpmessageandexit-v,--versionViewversioninformation-rPASSWORD_LENGTH,--random_passwordPASSWORD_LENGTHRandomlygeneratepasswordscontaininguppercaseandlowercaseletters/numbers/symbols-i,--initializationCreateorspecifyapasswordstoragefileinthecurrentdirectory-c,--cliStart CLIWorkbench-t,--transferResetprimarypassword(Changemasterpassword)Usehpass -iinitialize password data file in specified directory$hpass-iYourprimarypassword:Enteryourprimarypasswordagain:FindthepasswordstoragefileinthecurrentdirectoryPasswordstoragefileinitializedsuccessfullyUsehpassenter Workbench$hpassYourprimarypassword:H-Pass>Userandomgenerate a secure random passwordH-Pass>random16hiSVJ@77AEYFaZhuUseaddto add a new accountH-Pass>addThefollowingistheinformationrequiredforthenewpassword:Website=https://www.yeah.net/Notes=163YeahMailUsername=xxxxxxx@yeah.netEmail=Phone=Password=hiSVJ@77AEYFaZhuThenewpasswordhasbeensuccessfullyadded!Usesearchsearch password dataH-Pass>searchyeah+----+-----------------------+--------------+|ID|Website|Notes|+----+-----------------------+--------------+|18|https://www.yeah.net/|163YeahMail|+----+-----------------------+--------------+Usegetview password dataH-Pass>get18website=https://www.yeah.net/notes=163YeahMailusername=xxxxxxx@yeah.netemail=phone=password=hiSVJ@77AEYFaZhuUsesetchange password dataH-Pass>set18notesOriginalnotes=163YeahMailNownotes=YeahMailPasswordvaluemodifiedsuccessfully!Usehelpview cli help informationH-Pass>helpfilepath-Printtheabsolutepathofthepasswordstoragefileall-Viewthebasicinformationofallpassworddataadd-Enteranewpassworddatasearch<keyword>-Findpassworddatabykeywordrandom<length>-Generateasecurepasswordofspecifiedlengthget<id>-Viewthepassworddataofthespecifiediddel<id>-Deletethepassworddataofthespecifiedidset<id><key>-ModifythekeyvalueofthepassworddataofspecifiedidInstallationAs usual, the easiest way is with pip:$pipinstallhpassAlternatively you candownloadthehpass-x.x.x.tar.gzinstallation file:$pipinstallhpass-x.x.x.tar.gzPip will install dependencies(coloramaandPrettyTable)for you. Alternatively you can clone the repository:$gitclonehttps://github.com/hekaiyou/hpass.git--recursive$cdhpass$pythonsetup.pyinstallPhilosophyhpassuses RC4 algorithm for data encryption storage.Use key to generate S boxThe key-scheduling algorithm (KSA)defrc4_init_s_box(key):s_box=list(range(256))j=0foriinrange(256):j_step_1=j+s_box[i]j_step_2=j_step_1+ord(key[i%len(key)])j_step_3=j_step_2%256j=j_step_3s_box[i],s_box[j]=s_box[j],s_box[i]returns_boxUse S box to generate key streamThe pseudo-random generation algorithm (PRGA)defrc4_res_program(s_box,message):res=[]i=j=0forsinmessage:i=(i+1)%256j=(j+s_box[i])%256s_box[i],s_box[j]=s_box[j],s_box[i]t=(s_box[i]+s_box[j])%256k=s_box[t]res.append(chr(ord(s)^k))returnresLicensehpassis free and open-source software licensed under theMIT License.