QB64.org Forum

Active Forums => Programs => Topic started by: xra7en on April 02, 2021, 02:07:30 pm

Title: My Password Manager (MPM)
Post by: xra7en on April 02, 2021, 02:07:30 pm
Since I been out all week with covid (end of march 2021), I was reviving and old project of a password manager. This kicked in more so because of Lastpass selling out, and now having to pay. This as I just don't like the idea of storing my credentials on someone elses computer. Right? So I looked as some other open source PWM, but none really worked for me. KeePass was popular, but a little too heavy. So I decided to make my own, it is after all just a simple database.

As usual, my nostalgic self stuck to QB64 since it is great for that. Was going to do it vbnet or vb6, but just had too many dependencies for what it does.

This is a work in progress FYI.
You can add/edit right now, and it works pretty flawless at that so far.

WHY I PROGRAMMED IT THE WAY I DID
Right off the bat you will see I used a flatfile vs RANDOM file with records. I did the record version, and then a week later had to tear down the whole project. I began to realize that if I wanted to add, or change anything in the record, it would totally mess it up. This was first noticed when I did not allocate enough space for my blockchain id which are very long and found that it cut the length off. Of course changing that size also changed the record size and the file size. Now QB is not my native language (PHP/SQL is what I use the most - and currently learning Python), and I might have over looked something. So I changed it to a flat file, encrypting EVERYTHING before it is saved.  That is probably the BIGGEST debatable decision I made. but it works and is expandable. However, since I am a nobody, and nothing is saved online, it is secure enough for what i created it for.

The screens are all done with - YUP -  T H E D R A W ! ! !
THEDRAW artist wanted. I used the REMOTEACCESS BBBS theme for a base. Looks clean.

So in conclusion - are there better ways to do some of these routines and subs? YUP, does it make a difference in the result? not really. walks like a duck... But by all means PLEASE send me any changes. I am always learning QB64,

As a bonus - there is a very nice set of tools called UTILS.BI (required), hopefully you will find some cool routines in there - I've been adding to that since the late 90's (mostly from pascal).

Enjoy!!


Title: Re: My Password Manager (MPM)
Post by: bplus on April 02, 2021, 02:18:22 pm
Nice screen shoots, nice touch with icon selection too!

Did VB for DOS cast background shadows? I don' recall it did.
Title: Re: My Password Manager (MPM)
Post by: xra7en on April 02, 2021, 02:22:43 pm
yes.. I love vbdos just hated using dosbox to get it going..
and it lacked heavy in the database part :)
Title: Re: My Password Manager (MPM)
Post by: euklides on April 03, 2021, 04:39:16 am
My password manager is... an Excel file with all my passwords.

Here you have enough rows & columns to describe clearly everything: pass, name, alias, date, link, why... aso...

Of course, there is a password for open this Excel File.

Excel files with password on opening offer a very high security ...

Easy...
Title: Re: My Password Manager (MPM)
Post by: xra7en on April 03, 2021, 09:16:07 am
Lol, I have a Google sheets one, that's very secure with 2FA , and a calc sheet from Open office.

And working on a nice php/sql(local only) version.

I wanted to see how a qb64 would be. I still like last pass, just hate the monitary upgrade, I hear qb64 can do Android. Maybe oncan make qb64 work like last pass and pick up logins, prob not haha 😆😂
Title: Re: My Password Manager (MPM)
Post by: FellippeHeitor on April 03, 2021, 09:18:47 am
I hear qb64 can do Android.

Can't.
Title: Re: My Password Manager (MPM)
Post by: xra7en on April 03, 2021, 02:31:46 pm
Can't.

did this fall through? or am I reading that page wrong

http://www.[abandoned, outdated and now likely malicious qb64 dot net website - don’t go there]/wiki/index-php/Android_Project/
Title: Re: My Password Manager (MPM)
Post by: xra7en on April 03, 2021, 02:32:37 pm
o nm, found your other post regarding it here


https://www.qb64.org/forum/index.php?topic=43.0
Title: Re: My Password Manager (MPM)
Post by: Mad Axeman on April 04, 2021, 12:15:41 pm
Just had a quick play with your prog. When I first ran it I created a user/password and it displayed the 'Account Successfully Created!' message. Couldn't find a way to delete that message so hit 'Enter' a couple of times (yes, I now know I should tap space but there's no way of knowing' and got a 'Unhandled error #5
Line 332 in utils.bi
Illegal function call'

I restarted the prog and it ran okay. One thing I think does need tidying. When entering site details you have in the background 'Username', 'Login link' etc. When you enter the details it displays the white '?' from your string input and overwrites the background text. It just doesn't look right. In my opinion it shouldn't display the '?' and as soon as you move to each line the background text should be deleted before you start typing.  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Title: Re: My Password Manager (MPM)
Post by: bplus on April 04, 2021, 12:50:29 pm
Code: QB64: [Select]
  1. Input "Test input without ? see here > ", getInput$
Title: Re: My Password Manager (MPM)
Post by: xra7en on April 04, 2021, 01:02:18 pm
Code: QB64: [Select]
  1. Input "Test input without ? see here > ", getInput$

O nice, will have to update to that thanks!!
Title: Re: My Password Manager (MPM)
Post by: xra7en on April 04, 2021, 01:04:08 pm
@Mad Axeman
I will double check that, I believe that is a delay, not an input. it should just delay for 2 seconds.. so repeated hitting something makes sense as it would buffer the input and confuse next screen

I'll try something different. a pause? or the ole "..press ENTER to cont..." :-)

EDIT:
Yes it was just a 2 sec delay. However I did change that to a press ENTER. if anyone wants it. I'll put it up, otherwise I will add it to my next release
Title: Re: My Password Manager (MPM)
Post by: xra7en on April 04, 2021, 01:08:38 pm
Ugly "?" fix

the background text is actually the screen draw. I will have to figure something out on that. May just delete it all together. Not rocket science what each line does right :-)

Title: Re: My Password Manager (MPM)
Post by: bplus on April 04, 2021, 02:05:45 pm
Ugly "?" fix

the background text is actually the screen draw. I will have to figure something out on that. May just delete it all together. Not rocket science what each line does right :-)



Try graphics Input, very basic but might work over your background image.

Code: QB64: [Select]
  1. _Title "Graphics Input, inputG test" 'b+ 2019-11-01
  2. Screen _NewImage(800, 600, 32)
  3. _ScreenMove 300, 20
  4. y = 200: x = 100
  5.     P$ = "Enter something like *testing 1, 2, 3... * about 20 chars max > "
  6.     expectedEnterLen% = 20
  7.     inputG x, y, P$, inpt$, expectedEnterLen%
  8.     If inpt$ = "" Then Exit Do
  9.     Print "You entered: "; inpt$
  10.     y = y + 25
  11.     x = x + 30
  12.     If x + (Len(P$) + expectedEnterLen% + 5) * 8 > _Width Then x = 1
  13. Print "Test is done when empty string returned by inputG."
  14.  
  15. 'INPUT for Graphics screen
  16. Sub inputG (x, y, prmpt$, var$, expectedLenVar%) 'input for a graphics screen x, y is where the prompt will start , returns through var$
  17.     Dim tmp$, k$
  18.     saveAD = _AutoDisplay
  19.     _KeyClear
  20.     _PrintString (x, y), prmpt$ + " {}"
  21.     Do
  22.         k$ = InKey$
  23.         If Len(k$) = 1 Then
  24.             Select Case Asc(k$)
  25.                 Case 13: var$ = tmp$: Exit Sub
  26.                 Case 27: var$ = "": Exit Sub
  27.                 Case 8 'backspace
  28.                     If Len(tmp$) Then
  29.                         If Len(tmp$) = 1 Then tmp$ = "" Else tmp$ = Left$(tmp$, Len(tmp$) - 1)
  30.                     End If
  31.                 Case Else: If Asc(k$) > 31 Then tmp$ = tmp$ + k$
  32.             End Select
  33.             _PrintString (x, y), prmpt$ + " {" + tmp$ + "}" + Space$(expectedLenVar% - Len(tmp$)) 'spaces needed at end to clear backspace chars
  34.             If saveAD <> -1 Then _Display
  35.         End If
  36.     Loop
  37.  
  38.  
Title: Re: My Password Manager (MPM)
Post by: xra7en on April 04, 2021, 04:07:41 pm
you really should change your name to A+

:-)