Skip to content

passwordCrack is a pseudo-language I guess. One can use it to generate thousands of alphanumeric combinations, and this is it :) For more information, please consult the documentation.

Notifications You must be signed in to change notification settings

davidxbors/passwordCrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PasswordCrack

PasswordCrack is a language which should be used in generating alphanumeric combinations. It’s compiler(the only one at this moment, but I plan to write one in C in the future) is written in Go.

Usage

./passwordCrack <pc-doc-to-compile>

Documentation

Statements

Statements consist of either a literal or a variable, or combinations of both. A literal is for example “zoidberg” or “password”, and it’s evaluated to “zoidberg”, respectively “password”.

{password}
{%someVarExample%}
{password%years%}

Variables

Variables are declared by the following expression:

%variable_name%

This is followed by all the rules that one wants to define in that variable. In the end one must specify the end of a set of rules that need to be attributed to a variable, by repeating the opening expression. IMPORTANT: There cannot exist nested variables! Example of a variable declaration:

%dogBreeds%
p^ug
(golden retriever/labrador)
corgi
%dogBreeds%

Example of a variable use:

{Rex the %dogBreeds%}    

Explanation The code from the above is going to output Rex the + all the possible outcomes of all the rules defined in the variables dogBreeds. This means it’s going to generate:

Rex the pug
Rex the Pug

Because of the first rule

Rex the golden retriever
Rex the labrador

Because of the second rule

Rex the corgi

Because of the third rule

Rules

Rules are the heart and soul of passwordCrack. A rule takes a literal and modifies it by a set of deriving rules creating all the possible outcomes when derivated. Rules cannot contain variables inside them.

Literal

corgi

This one is just a literal, so it’s gonna evaluate to “corgi”

^

p^ug

The or opposite means that the character(or group of characters) behind it can either be in the state they currenly are or in the opposite. In this case the rule it’s gonna evaluate to [“pug”, “Pug”]. And in this case:

L^abrador

it’s gonna evaluate to [“Labrador”, “labrador”]

() The begin group and end group operators have the role of grouping two or more characters togheter in order to apply the operation to them as a group. Any operation that can be applied to a single character can also be applied to a group. For example:

(REX)^ the (dog)?

It’s gonna evaluate to: [“REX the dog”, “REX the “, “rex the dog”, “rex the “]. There is a special operation that can be applied in a grouped set of charachters, and that one is the or ( / ) operation. This one means that the rule should evaluate to either the left side of the operator or the the right side. For example

Rex the (funny/cute) dog

it’s gonna evaluate to [“Rex the funny dog”, “Rex the cute dog”]

? The one or zero operator means that the character/group of characters behind the operator can be ommited.(Therefor we can have one or zero instances of it). For example:

pass(word)?

it’s gonna evaluate to [“password”, “pass”].

/+ The till now or plus operator means that the rule should either evaluate to everything that can be evaluated behind this sign or to everything behind this sign plus the rest of the rule. For example:

password1/+2/+/3+4

it’s gonna evaluate to [“password1”, “password12”, “password123”, password1234”].

?^ or ^? If there wouldn’t be a special case built in the compiler for this scenario whenever the user would try to apply this both operations the compiler would either apply the rule to a character we don’t want to derive or it would create a double of one of the outcomes.

IMPORTANT: all the characters listed above as operators are reserved characters, so to use them one should proceed by placing a backslach behind them. Keep in mind, that the blackslash itself is a reserved character as well.

pass(w\ord/phrase)?

The rule from above it’s going to give us an error, as backslash needs a reserved character afterwards.

pass(w\\ord/phrase)?

The rule from above it’s going to evaluate to [“passw\ord”, “passphrase”, “pass”].

pass\(w\\ord\/phrase\)\?

But the rule from above it’s going to evaluate to “pass(w\ord/phrase)?”.

About

passwordCrack is a pseudo-language I guess. One can use it to generate thousands of alphanumeric combinations, and this is it :) For more information, please consult the documentation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages