npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jscombinator

v0.1.1

Published

Flexible tool to generate Combination

Downloads

3

Readme

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