0.1.1 • Published 8 years ago

jscombinator v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Combinator

Not Another Hash Cracker

Introduction

Combinator is a KISS (Keep.It.Simple.Stupid) but Flexible Combilation-with-Repetition generator.

Blasphemy: Can be used as Brute-Force

Grab your world-fastest hash/password cracker here: John The Ripper HashCat OphCrack HashCracker THC-Hydra

Usage

Return a subsequences of elements from the input iterable allowing individual elements to be repeated more than once.

Combinations are emitted in lexicographic sort order. So, if the input iterable is sorted, the combination tuples will be produced in sorted order.

Elements are treated as unique based on their position, not on their value. So if the input elements are unique, the generated combinations will also be unique.

Elements in alphabet are Position-Significant. So if an element comes first in the alphabet Array (has smaller index), then it's treated as "smaller" of next one.

Require

require("jscombinator")

Return an object with:

  • comb: The Combinator function
  • dict: An object with pre-generated alphabet/dictionary

Combinator function

var simpleComb = require("jscombinator").comb;
simpleComb(Array.range('A','C'), [1,2], function(value){
  console.log(value);
  return false;
});

The function take 3 parameters:

  • The alphabet/dictionary as Array of String
  • The size(sizes) of the resulting sequences of elements (Integer or Array of Integer)
  • A Callback function that take the current generated sequence of elements and MUST return true if you want to end the generation, false otherwise

This example will print:

A
B
C
AA
AB
AC
BA
BB
BC
CA
CB
CC

Array.range(start, stop, step)

Combinator will extend the Array prototype to add this function.

Array.range(start, stop, [step]
  • start: the starting element
  • stop: final element
  • step: Optional step from an element to the next one

Return an Array of elements

Example:

Array.range('A','C')
// ['A', 'B', 'C']
Array.range(1,6)
// [1, 2, 3, 4, 5, 6]

Alphabet/Dictionary

Combinator comes with some Alphabet for generate combination faster. The available Alphabet are:

dict.numeric // from 0 to 9
dict.hex // from 0 to 9 + from 'A' to 'F'
dict.lower_alpha // from 'a' to 'z'
dict.lower_alpha_numeric // from 'A' to 'Z' + from 0 to 9
dict.upper_alpha // from 'A' to 'Z'
dict.upper_alpha_numeric // from 'A' to 'Z' + from 0 to 9

Installation

npm install jscombinator

Use case

Calculate an MD5 pre-image of first 5 characters MD5-crack.js

0.1.1

8 years ago

0.1.0

8 years ago