Skip to content

Commit

Permalink
Added dub files and readme files
Browse files Browse the repository at this point in the history
  • Loading branch information
JackStouffer committed Feb 1, 2017
1 parent bbb5268 commit fd317cb
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,4 +1,5 @@
wordlist_*
.dub/
*.sublime-*
*.log
*.log
dub.selections.json
19 changes: 19 additions & 0 deletions LICENSE.md
@@ -0,0 +1,19 @@
Copyright 2017 Jack Stouffer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
26 changes: 26 additions & 0 deletions README.md
@@ -0,0 +1,26 @@
FOR EDUCATIONAL PURPOSES ONLY. THE AUTHOR DOES NOT CONDONE NOR ENDORSE
UNAUTHORIZED ACCESS OF COMPUTER SYSTEMS. Licensed under the MIT License.

Generates a password list using information about the owner of the
device you are attempting to access. It is very common for people to
create passwords using items from their daily lives. So this program
takes that info and generates common password formats from it. Good
examples of information to give to the program are things like

* the owner and their date of birth
* phone numbers
* address number
* all of the owner's family members and their dates of birth
* important dates, like an anniversary
* names of the owner's past/current pets
* places where the person has lived
* names of the companies this person has worked for
* make or model of cars the person has owned
* favorite bands
* the name of the service the password is being used for, e.g. the
name of the OS or the name of the website

Using leaked password databases as a sample, roughly 30% of people will use a
password which this program will catch. According to other research, another
10% of people use passwords in the 500 top worst password list. So using this
program in conjunction with other wordlists can yield almost half of all accounts.
6 changes: 6 additions & 0 deletions dub.sdl
@@ -0,0 +1,6 @@
name "wordlist_gen"
description "A wordlist generator using targeted information"
authors "Jack Stouffer"
dependency "dateparser" version="~>3.0.0"
license "MIT"
targetType "executable"
25 changes: 12 additions & 13 deletions main.d → source/app.d
@@ -1,8 +1,3 @@
/+ dub.sdl:
name "wordlist_gen"
dependency "dateparser" version="~>3.0.0"
+/

import std.stdio;
import std.datetime;
import std.typecons;
Expand Down Expand Up @@ -48,6 +43,7 @@ static immutable commonPatterns = [
"asdf", "asdfasdf", "asdfghjkl", "password", "q1w2e3r4", "qazwsx", "qwert",
"qwerty", "qwertyuiop", "zxcvbnm"
];
static immutable seperators = [",", ".", "/", "-", "_"];


/**
Expand Down Expand Up @@ -117,7 +113,7 @@ void commonGuesses(Output)(Info info, ref Output output) if (isOutputRange!(Outp
auto capitalized = info.data.capitalize;
auto upper = info.data.toUpper;
auto leet = info.data.toLeet;
// optimize for rare case where there are no "1337" characters in
// optimize for the case where there are no "1337" characters in
// the item
bool useLeet = leet != lower && leet != capitalized && leet != upper;

Expand Down Expand Up @@ -148,11 +144,12 @@ void commonGuesses(Output)(Info info, ref Output output) if (isOutputRange!(Outp
// Also covers people who put a year at the end of something
foreach (i; 0 .. 10_000)
{
output.put(chain(lower, i.toChars, "\n"));
output.put(chain(capitalized, i.toChars, "\n"));
output.put(chain(upper, i.toChars, "\n"));
auto s = i.toChars;
output.put(chain(lower, s, "\n"));
output.put(chain(capitalized, s, "\n"));
output.put(chain(upper, s, "\n"));
if (useLeet)
output.put(chain(leet, i.toChars, "\n"));
output.put(chain(leet, s, "\n"));
}

// other very common patterns
Expand Down Expand Up @@ -200,7 +197,7 @@ void guessesFromDate(Output)(Info info, ref Output output) if (isOutputRange!(Ou
output.put(chain(day, month, year[2 .. year.length], "\n"));
output.put(chain(day, month, "\n"));

foreach (sep; [",", ".", "/", "-", "_"])
foreach (sep; seperators)
{
output.put(chain(year, sep, month, sep, day, "\n"));
output.put(chain(year[2 .. year.length], sep, month, sep, day, "\n"));
Expand Down Expand Up @@ -373,14 +370,16 @@ void main()
* make or model of cars the person has owned
* favorite bands

Generated files are roughly of size n*40000, where n is the amount
of info added.
Generated files are roughly of length in lines of n*40000, where n is
the amount of info added.

Commands:
common | c = a string that represents something important to this person
person | p = a person, will ask for name and DoB
pet | z = a pet
date | d = an important date
phone | e = a phone number
address | w = a phone number
finish | f = finish and generate
quit | q = quit without generating
});
Expand Down

0 comments on commit fd317cb

Please sign in to comment.