Closed Pietrob5 closed 2 months ago
Hey there, Im attempting to make GUI for this using built in Tkinter i have used it in passed for 2 projects have bit of experience but sadly its very much tricky at times to implement some stuff. As of now trying to make basic frame work and functionality of gui working with your existing code it be tiny bit prettified later on not much options in tkinter beside colors fonts. I cant promise if i can deliver but if i can make something good will definitely contribute. Always been solo hobbist type coder new to this git stuff too, Dont know if this right place or not but here are some previews..
@kun4LGit no worries! The pic you sent look really good. This is more o less what I wanted with all 9 buttons on top and input fields in the main frame. Thank you for your work, really appreciate. When everithing works and you are ready send a Pull Reques and I'll merge your code. If you want and it's not to difficult you might change some colors, maybe blue or yellow instead of grey. Thank you!
@Pietrob5 Yes hope to get it read soon, For now my main priority is just to get all the functionality stuff working then we can always make the app tiny bit pretty with whatever tkinter have to offer.
@kun4LGit yes I agree. If you have any questions just post here. Thank you
@kun4LGit yes I agree. If you have any questions just post here. Thank you
Hello there, Is there any Discord where i can show in some suggestions and changes i made to main code. If not then i will try to keep it short and type here :D
made bit suggestion changes to def print_all(master_password):
so that it gives in return dictionary key value which is way more convenient easier to to fetch values for gui
we can just use only printall to get / fetch any data we need f"Service : {Value}"
something like this
another issue i found when we entered blank space in printall we use to get some value error which was impossible to Except has to do something with fernet i dont know how it works still tried to check out docs couldnt find any answer so i straight away stopped the empty entry masterpassword !=
and prevented it from crashing we just get a list printed Master Password Invalid instead..
👆 this might seem ok issue for CLI but for GUI its not good practice as per my past experience when i made py gui program to exe it gave me so weird crashes i was stuck for long time hence it was main reason to get it solved to right now if you planned to make this in to an .exe in future.
Gui progress well its been going on good so far as i said was mainly stuck on fetching data from main pm file and since its solved the remaining work will be done soon in coming time too then once its full functional will get to make it looking bit more tidy and yes i added all 9 buttons too but for now only Add Credentials, Print All, Help are functional rest are just place holders for now but since the function data flowing in through dict {} so no worries.. OH yess almost forgot.. Implemented checks for Add Credentials too like missing fields or if Master Pass not same the GUI just wont push data to main file function.
BTW im using other computer to code all this and cant installed git here as soon as i get my old laptop fixed in coming days i will shift all stuff there and try update more in proper manner..
I might be not available for few days, Meanwhile please help me guide on how to make branch on my profile so you can check the changes in printall function.
PS : I dont know how to update files (have to check git stuff 🙈😄😅 ) made account because of your project and for similar future work. Im just a 🏫 dropout guy who likes to code but not gonna lie im enjoying this process a lot, I really like helping contributing people in non virtual world too and this is one of the best experience im having :) Thank You for this, Take Care 👋 See you after few days
@kun4LGit Thank you! To show your work you can make a Pull Reques from the repository you forked on your profile by clicking on add file and create a new file and paste all the code you have on your local computer. Name the file something like pm_gui.py
(so that we have two different versions: CLI and GUI). Then there should be some button like Sync or something similar that will show the option to send a Pull Request. Now you can add a small description so that I know the main thing you changed. In the new file you created feel free to changhe any functions you like, but please comment in the code what you did and why, so that I can track safety and security of the program. You can also make more than one PR, so I can see how it's going even if the work isn't 100% finished.
As I understand the problems you had with print_all
and when we entered blank space are only for the GUI version, right? Because I added a check that avoids blank inputs.
If you want to contact me directly you can use telegram or just add a comment here so that everyone who wants to contribute can see what we are up to. Thanks
@kun4LGit now that you tell me it's true, there is no control to avoid a blank master password. I'll fix it!
@kun4LGit now that you tell me it's true, there is no control to avoid a blank master password. I'll fix it! Its cool no need to fix i already did it, But just didnt know much about the pull request stuff i will do check / read out your reply on it later but for now here is the edited function print_all function
`def print_all(master_password): conn = sqlite3.connect('passwords.db') c = conn.cursor() c.execute("SELECT service, email, encrypted_password, note, salt FROM passwords ORDER BY service") rows = c.fetchall()
resList = {}
resList_Empty = {"Invalid MASTER PASSWORD" : "Retry"}
print("Searching.. Please Wait..")
print("---------------------------------------------------------")
if master_password != "":
if len(rows) == 0:
print("Database is empty.\n")
for row in rows:
service, email, encrypted_password, note, salt = row
key = generate_key(master_password, salt)
cipher_suite = Fernet(key)
try:
decrypted_password = cipher_suite.decrypt(encrypted_password).decode()
resList.update({"Service": service, "Email": email, "Password": decrypted_password, "Note": note})
except:
if resList == {}:
pass
else:
resList_Empty.clear()
resList_Empty.update(resList)
break
for k, v in resList_Empty.items():
if resList_Empty != {"Invalid MASTER PASSWORD" : "Retry"}:
# print(resList_Empty)
print(f"{k}: {v}")
else:
# print(resList_Empty)
print(f"{k}: {v}")
else:
print(resList_Empty)
return resList_Empty`
@kun4LGit Hi! I made some major changhes to pm.py and pm_gui.py. You're welcome to take a look and if you want you can follow these guidelines to finish implementig service 2, 3, 4. For the GUI I follow your implemetation (without that I whouldn't have had any idea on how to start with GUI). I'm really grateful for your work and how the program is evolving. Thank you!
@kun4LGit Hi! I made some major changhes to pm.py and pm_gui.py. You're welcome to take a look and if you want you can follow these guidelines to finish implementig service 2, 3, 4. For the GUI I follow your implemetation (without that I whouldn't have had any idea on how to start with GUI). I'm really grateful for your work and how the program is evolving. Thank you!
Im glad 🙏 I hope the program evolves in the direction and vision you have thought get good achievements :) Yes im checking code already solved 1 stuff going to update it soon look in to printall also :) 👍
Add a GUI with textbox to write the password and 9 buttons, one for each functionality. The output sould be displayed in the GUI as well.