flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > Simple password generator.

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
MHajduk



Joined: 30 Mar 2006
Posts: 6115
Location: Poland
MHajduk 18 Aug 2008, 16:17
Hi!

I want to present here program SimPaGen which is a simple in use, small and very flexible application for password creation. Written with FASM utility makes easier generation of safe passwords used for logging on various forums, e-mail accounts and other sites.

Simple animation presenting program SimPaGen execution:

Image

Created passwords consist of characters belonging to any combination of these four predefined categories:

  • letters A, ..., Z,
  • letters a, ..., z,
  • digits 0, ..., 9,
  • underscore symbol '_'


and the user-defined character set. Number of all possible non-empty character sets is equal to 2^224-1 (number of all non-empty subsets of the set containing symbols with hexadecimal codes from 0x20 to 0xFF). Maximal length of the generated password is equal to 9999 characters. Created password is copied into the clipboard by pushing the button

Image

Special hotkey WIN + F12 defined by application, generates a new password and copies it into the clipboard (also if the application window is not active).

Program settings such as length of the created passwords and password character set are saved in the registry key

HKEY_CURRENT_USER\Software\SimPaGen\<program_version>

when the application ends.

Application uses CryptoAPI functions from 'advapi32.dll' library in order to gain "cryptographically random" sequence of the password characters.

Source file of the application contains embedded data of the manifest and the program icons.

Program is an example of the edit fields subclassing method.

Here you can download application with source file encoded in UTF-8.

Project's homepage: http://mikhajduk.houa.org/EN/SimPaGen.php

Because program was described in 3 language versions here you have also:

Program tested under Windows XP SP3.


Last edited by MHajduk on 17 Sep 2008, 20:16; edited 3 times in total
Post 18 Aug 2008, 16:17
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20355
Location: In your JS exploiting you and your system
revolution 18 Aug 2008, 18:05
How about adding a button "copy to clipboard". Saves the user having to select and press ctrl-C.
Post 18 Aug 2008, 18:05
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6115
Location: Poland
MHajduk 18 Aug 2008, 18:33
revolution wrote:
How about adding a button "copy to clipboard". Saves the user having to select and press ctrl-C.
I'll think about it. Wink
Post 18 Aug 2008, 18:33
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 18 Aug 2008, 19:54
BTW, here's the character set I've been using to generate the startup (one-time use) passwords in one of my projects:

346789bcdfghjkmnprstwxzBCDFGHJKLMNPRTWX

It was composed with two things in mind: first, it should not contain characters that could be easily confused with each other in some fonts (like l and 1 or O and 0); and second, that it should not generate any meaningful words (especially the curse words, etc.) - which I achieved by not including the vowels.
Post 18 Aug 2008, 19:54
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20355
Location: In your JS exploiting you and your system
revolution 18 Aug 2008, 19:59
Tomasz Grysztar wrote:
... it should not contain characters that could be easily confused with each other in some fonts ...
All of the uppercase/lowercase letters look the same when using a smallcaps style Wink
Post 18 Aug 2008, 19:59
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 18 Aug 2008, 20:21
Very Happy
Post 18 Aug 2008, 20:21
View user's profile Send private message Visit poster's website Reply with quote
dead_body



Joined: 21 Sep 2005
Posts: 187
Location: Ukraine,Kharkov
dead_body 22 Aug 2008, 06:12
thanks, cool program Smile

What about adding a format for password?

For '111*' - will generate password with first '111'.
For 'vitya_*_85' - will generate passwords wich begins with 'vitya_' and ends with '_85'
Post 22 Aug 2008, 06:12
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6115
Location: Poland
MHajduk 22 Aug 2008, 07:45
dead_body wrote:
What about adding a format for password?

For '111*' - will generate password with first '111'.
For 'vitya_*_85' - will generate passwords wich begins with 'vitya_' and ends with '_85'
Indeed, using formats or even regular expressions for password generation is an interesting idea. Smile I'll try to add this feature to the next version of this application. Thanks for inspiring comment, dead_body. Very Happy
Post 22 Aug 2008, 07:45
View user's profile Send private message Visit poster's website Reply with quote
dead_body



Joined: 21 Sep 2005
Posts: 187
Location: Ukraine,Kharkov
dead_body 23 Aug 2008, 17:27
Quote:

MHajduk


I will post your program at wasm.ru in sources?
Links to your site will be added, of course. Wink
Post 23 Aug 2008, 17:27
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6115
Location: Poland
MHajduk 24 Aug 2008, 12:16
dead_body wrote:
I will post your program at wasm.ru in sources?
Links to your site will be added, of course. Wink
Thanks! Very Happy I'm glad that this utility is appreciated on wasm.ru, excellent site full of good articles, utilities and educational applications, with great and creative community. Very Happy
Post 24 Aug 2008, 12:16
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1391
Location: Piraeus, Greece
Picnic 02 Sep 2008, 13:05
Nice program MHajduk!
I'm missing something, i see no idata section using the include directive to import libraries. I saw that before, can you explain a bit?

_________________
Hobby BASIC Interpreter
Post 02 Sep 2008, 13:05
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6115
Location: Poland
MHajduk 02 Sep 2008, 13:29
Thanks, thimis. Smile

I simply used some features of extended header 'win32wx.inc' which give possibility to "forget" about manually written import section. It's very convenient. You just need to put the line '.end <label_name>' (where '<label_name>' is the entry point of your program) at the end of the code and the import section will be added automatically. Smile
Post 02 Sep 2008, 13:29
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1391
Location: Piraeus, Greece
Picnic 02 Sep 2008, 13:47
very convenient indeed, nice tip MHajduk Wink
Post 02 Sep 2008, 13:47
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6115
Location: Poland
MHajduk 17 Sep 2008, 20:22
New version of SimPaGen application available.

Additions and changes:

[+] added button Image which copies password from the application edit field to the clipboard,

[+] added hotkey WIN + F12 which generates new password and copies it to the clipboard (hotkey works also if application window is not active),

[+] added possibility of saving actual program settings (password length and password character set) in the Windows registry,

[x] simplified and corrected operations on the array which defines characteristic function of the password character set.

For the download links see the first post of this thread.
Post 17 Sep 2008, 20:22
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4046
Location: vpcmpistri
bitRAKE 17 Sep 2008, 20:38
See a small error in display:


Description:
Filesize: 9.77 KB
Viewed: 26347 Time(s)

SimPaGen v.2008.09.11.0.png



_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 17 Sep 2008, 20:38
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6115
Location: Poland
MHajduk 18 Sep 2008, 09:21
What version of the Windows system do you use, bitRAKE? I wrote this program under Windows XP SP3 Home Edition.

Even in the classic style of the Windows display I can see this:

Image

I would expect more elaborate report about circumstances of this strange behavior (if it was real).
Post 18 Sep 2008, 09:21
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 18 Sep 2008, 10:16
have no problems here - was clicking everything but no similar bug reproducing


Description:
Filesize: 5.15 KB
Viewed: 26318 Time(s)

en.png


Description:
Filesize: 5.28 KB
Viewed: 26319 Time(s)

pl.png


Description:
Filesize: 5.04 KB
Viewed: 26318 Time(s)

ru.png



_________________
UNICODE forever!
Post 18 Sep 2008, 10:16
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4046
Location: vpcmpistri
bitRAKE 18 Sep 2008, 13:53
MHajduk wrote:
I would expect more elaborate report about circumstances of this strange behavior (if it was real).
Currently I'm using Windows 2003 Server x64 SP1. I have not fabricated anything. When I first run the program there is nothing where "A-Z" should be - the checkbox is present and functional, but no text. Using the checkbox produces the picture shown. (Just downloaded it again to be certain - same error. Might be related to DEP as moving the strings to the data section fixes the error. At this time I have no idea why these two strings ("A-Z" and "Other:") do not work while the rest are fine.)

I'll try it on WinXP and report again.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 18 Sep 2008, 13:53
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6115
Location: Poland
MHajduk 18 Sep 2008, 15:05
To pass quoted text strings as a procedure parameters I use macros included with the extended header 'win32wx.inc'.

Probably for 64-bit system (as yours) should be used header file 'win64w.inc'?

Maybe it will fix this problem (32-bit data alignment in 64-bit system???) for 64-bit Windows (I have 32-bit). Smile
Post 18 Sep 2008, 15:05
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4046
Location: vpcmpistri
bitRAKE 18 Sep 2008, 16:14
Very good - alignment makes sense. Only those two strings start at an odd address - wide strings need to be word aligned at minimum.

Adding three lines to WIN32WX.INC (line 109):
Code:
    if (1 and $)=0 ; force aligned
     nop           ; wide character
    end if         ; string
    call ..continue
    du value,0
    ..continue:    
...also fixes the error. This should work for all encodings of CALL (except 64-bit far call - not likely to be used in Windows). Maybe should be used at line 73 as well.

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 18 Sep 2008, 16:14
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.