Skip to content

Substitution

Михаил edited this page Jan 31, 2017 · 11 revisions

This command allow to get all possible variation of one word, wherein made all possible substitutions of every letter. All possible substitutions are taken from default (or specified) dictionary with list of methods. Also you can run this command in interactive mode, and enter one word per line to obtain list of substitutes for each.

##Help To see the usage: PasswordListGenerator.exe subs

If you want to see additional help: PasswordListGenerator.exe help subs

##Options

###Change input There are three ways to input source data in the program:

Also you can see demonstration examples in demo folder.

####Specify source word from console This form of use is the best choice when you need get substitutions only for one or several words.

PasswordListGenerator.exe subs [options] SOURCE_WORD

You will see all possible substitutions for source word SOURCE_WORD in console. If source word will contains symbols there are not present in the dictionary, error message and usage text will appear on the screen.

####Use interactive input This form of use is the best choice when you need get substitutions for many different words, or if user will specify words at runtime.

PasswordListGenerator.exe subs [options] -i

After enter this command you will be able to enter source words one by one. After typing the source word press Enter and you will see all possible substitutions for this word, and you can enter next source word. When you will end just press Enter without specifying source word and the program will terminate. If you enter word with symbols not presented in the dictionary, error appears on the screen, but you will be able to continue input.

####Use command line pipe This form of use is the best choice when you need get substitutions for big list of source words.

type file_with_list_of_source_words.txt | PasswordListGenerator.exe subs [options] -i

After this command will be entered, substitutions for every word in file_with_list_of_source_words.txt file will appear on the screen. If any of words will contains symbols not presented in the dictionary, error will appear after current source word, but substitutions will go on for all other words.

###Change output There are two ways to get output substitutions from the program:

Also you can see demonstration examples in demo folder.

####Specify output file as option For specifying output file you need designate -o or --out-file option with filename argument.

PasswordListGenerator.exe subs [options] SOURCE_WORD -o output_filename

After the program is executed, all substitutions can de found in output_filename. If any word can't be processed, error will appear in output file.

####Redirect output to file You can also just redirect program output into any file by console command > or >>.

PasswordListGenerator.exe subs [options] SOURCE_WORD > output_filename

After the program is executed, all substitutions can de found in output_filename. If any word can't be processed, error will appear in output file.

###Ignore case Default dictionary specifies only capital case english letters. If you want use default dictionary (or you own dictionary without lowercase symbols) you must specify --ignore-case option. Then every symbol in your source word will be replaced without caring about letter case.

PasswordListGenerator.exe subs --ignore-case iNpuT_wOrD

In case if there was specified dictionary (see section) with both lowercase and uppercase letters, then --ignore-case option will convert word in uppercase.

###Dictionary structure

{
    "Method1": {      //Name of first method
        "A": [          //First symbol
            "/-\\",       //First replacement
            "4",          //Second replacement
            ...           //And so on
            "A"
        ],
        "B": [],        //Second symbol
        ...             //And so on
        "Z": []
    },
    "Method2": {...}, //Name of second method
    ...               //And so on
    "MethodN": {...}
}

The file's fields filled with in accordance with the JSON Standart.

You can find default dictionary for example in [EnglishLeetDict.json] (https://github.com/gek0n/passwordlistgenerator/tree/master/PasswordListGenerator/PasswordListGenerator/Resources/EnglishLeetDict.json) file.

You can named methods of dictionary as you want, and you can replace any ASCII characters with any string. Number of methods or symbols is undefined.

###Set the dictionary If you want specify other dictionary, you need to create json file with described structure.

After create the file, you must specify new dictionary using -d or --dict option:

PasswordListGenerator.exe subs -d new_dict.json input_word

[EnglishLeetDict.json] (https://github.com/gek0n/passwordlistgenerator/tree/master/PasswordListGenerator/PasswordListGenerator/Resources/EnglishLeetDict.json) json file is default dictionary for substitutions.

###Choice the method If you want specify substitution method, you need specify new dictionary or use default (see section). After that you need choice a method specified in the dictionary (see section).

Use -m or --method to specify method, defined in the dictionary:

PasswordListGenerator.exe subs --method GoodLeet input_word

or

PasswordListGenerator.exe subs -d new_dict.json -m method1 input_word

There are 4 methods in default dictionary: GoodLeet, MadLeet, Cyrillic and Pronunciation.

  • GoodLeet (default) is provide alphabet to make easy-to-read leet words from source word.
  • MadLeet is provide alphabet to make complicated leet words from source word.
  • Cyrillic is provide alphabet for replace english letters by it's russian analog.
  • Pronunciation is provide alphabet for replace english letters by it's pronounced form.

You can specify your own methods in your own dictionary for any ASCII letters.

###Specify encoding If you want input word in some not UTF-8 encoding, you need to specify --in-encoding option (or --out-encoding for output substitutions). You can specify any encoding in this option:

PasswordListGenerator.exe subs --in-encoding="cp1251" input_word

Default encoding for input and output is UTF-8. Also, you can find list of available encodings on .NET System.Text.Encoding documentation.

###Verbose If you want to see more information about substitutions, you must specify -v or --verbose option.

Introdutcion

Commands

Clone this wiki locally