Settings

Theme

Show HN: Generate Passwords from Regex Constraints

gruhn.github.io

8 points by ngruhn 2 months ago · 6 comments

Reader

_jzlw 2 months ago

Okay, this is kindof incredible. The ability to create a complicated regex from smaller pieces combined in a logical way is insane. This has so many uses.

https://github.com/gruhn/regex-utils#comment-regex-using-com...

forgotpwd16 2 months ago

Heh, cool concept. Could maybe add some interactive configuration common password gen tools have like choose length, characters used (upper, lower, numbers, symbols) so people not accustomed to regex can play with (and see how for each configuration the regex changes).

Your regex-utils library also interesting, especially the set operations part.

djfobbz 2 months ago

When I use the following constraints:

    ^.{6,8}$
    [0-9]
    [A-Z]
    [a-z]
I get:

    F񣛯7򴘇󢎺򋛠o
    d1󴆂󯹓󶄁񪥴A񴊆
    𑐟Ku򍅼󨫢9􆯩
    𑍞4񾋚𢗏Rw򂚃񷰗
    I򹪴𦢺򎐝2𵞎򓛹r
I don't think those block chars should be there. Am I missing something?
  • ngruhnOP a month ago

    It picks characters from the whole unicode range. Those strings should indeed match all regex constraints. You can add a constraint like:

        ^[\x21-\x7E]*$
    
    To only choose printable ASCII characters.

    EDIT: no you're right, there is a bug. I would expect random unicode chars but not always the same box.

    • ngruhnOP a month ago

      Actually no again, I think the browser can just not render those.

jmlim00 2 months ago

Nice, wonder if this can integrated into password managers!

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection