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

crack-js

v1.0.5

Published

Javascript library to crack various hashes in hashcat format

Downloads

36

Readme

crack-js

JavaScript implementation of various hashing algorithms. All hashes are accepted in Hashcat format. For more information, visit the Hashcat wiki.

Currently supported hash types:

|Type|Example|Password| | --- | --- | --- | |md5crypt|$1$28772684$iEwNOgGugqO9.bIz5sk8k/|hashcat| |sha256crypt|$5$rounds=5000$GX7BopJZJxPc/KEK$le16UF8I2Anb.rOrn22AUPWvzUETDGefUmAV8AZkGcD|hashcat| |sha512crypt|$6$52450745$k5ka2p8bFuSmoVT1tzOyyuaREkkKBcCNqoDKzYiJL9RaE8yMnPgh2XzzF0NDrUhgrcLwg78xs1w5pJiypEdFX/|hashcat| |bcrypt|$2a$05$LhayLxezLhK1LhWvKxCyLOj0j1u.Kj0jZ0pEmm134uzrQlFvQJLF6|hashcat| |ntlm|b4b9b02e6f09a9bd760f388b67351e2b|hashcat| |md5|8743b52063cd84097a65d1633f5c74f5|hashcat| |sha1|b89eaac7e61417341b710b727768294d0e6a277b|hashcat| |sha256|127e6fbfe24a750e72930c220a8e138275656b8e5d8f48a98c3c92df2caba935|hashcat| |sha512|82a9dda829eb7f8ffe9fbe49e45d47d2dad9664fbb7adf72492e3c81ebd3e29134d9bc12212bf83c6840f10e8246b9db54a4859b7ccd0123d86e5872c1e5082f|hashcat| |hmac-md5(*)|bfd280436f45fa38eaacac3b00518f29:1234|hashcat| |hmac-sha1(*)|d89c92b4400b15c39e462a8caa939ab40c3aeeea:1234|hashcat| |hmac-sha256(*)|8efbef4cec28f228fa948daaf4893ac3638fbae81358ff9020be1d7a9a509fc6:1234|hashcat| |hmac-sha512(*)|7cce966f5503e292a51381f238d071971ad5442488f340f98e379b3aeae2f33778e3e732fcc2f7bdc04f3d460eebf6f8cb77da32df25500c09160dd3bf7d2a6b:1234|hashcat| |netntlmv2|admin::N46iSNekpT:08ca45b7d7ea58ee:88dcbe4446168966a153a0064958dac6:5c7830315c7830310000000000000b45c67103d07d7b95acd12ffa11230e0000000052920b85f78d013c31cdb3b92f5d765c783030|hashcat| |mysql323|7196759210defdc0|hashcat| |jwt|eyJhbGciOiJIUzI1NiJ9.eyIzNDM2MzQyMCI6NTc2ODc1NDd9.f1nXZ3V_Hrr6ee-AFCTLaHRnrkiKmio2t3JqwL32guY|hashcat|

(*) password will be tested as message and secret phrase

Installation

npm install crack-js

Compiles and minifies for production

npm run build

Usage

const hashcat = require('crack-js');

const password="hashcat";
const hash="b4b9b02e6f09a9bd760f388b67351e2b";
const type="ntlm"

if(hashcat.verifyHash(password,hash,type)==TRUE)
{
    console.log("Password found!");
}

Parameters

The verifyHash function takes the following options:

  • password (required): The password that will be used to verify the hash
  • hash (required): Hash in specified format to test.
  • type (required): Type of the hash. You can list all available types with availableHashTypes

Return Value

The verifyHash function returns true if supplied hash is valid for the password and false if not.

Example

const hashcat = require('crack-js');

console.log(hashcat.availableHashTypes);
console.log(hashcat.verifyHash("hashcat","eyJhbGciOiJIUzI1NiJ9.eyIzNDM2MzQyMCI6NTc2ODc1NDd9.f1nXZ3V_Hrr6ee-AFCTLaHRnrkiKmio2t3JqwL32guY","jwt"))
console.log(hashcat.verifyHash("hashcat","$6$52450745$k5ka2p8bFuSmoVT1tzOyyuaREkkKBcCNqoDKzYiJL9RaE8yMnPgh2XzzF0NDrUhgrcLwg78xs1w5pJiypEdFX/","sha512crypt"));
console.log(hashcat.verifyHash("hashcat","$5$rounds=5000$GX7BopJZJxPc/KEK$le16UF8I2Anb.rOrn22AUPWvzUETDGefUmAV8AZkGcD","sha256crypt"));
console.log(hashcat.verifyHash("hashcat","b4b9b02e6f09a9bd760f388b67351e2b","ntlm"));
console.log(hashcat.verifyHash("hashcat","8743b52063cd84097a65d1633f5c74f5","md5"));
console.log(hashcat.verifyHash("hashcat","b89eaac7e61417341b710b727768294d0e6a277b","sha1"));
console.log(hashcat.verifyHash("hashcat","127e6fbfe24a750e72930c220a8e138275656b8e5d8f48a98c3c92df2caba935","sha256"));
console.log(hashcat.verifyHash("hashcat","82a9dda829eb7f8ffe9fbe49e45d47d2dad9664fbb7adf72492e3c81ebd3e29134d9bc12212bf83c6840f10e8246b9db54a4859b7ccd0123d86e5872c1e5082f","sha512"));
console.log(hashcat.verifyHash("hashcat","$2a$05$LhayLxezLhK1LhWvKxCyLOj0j1u.Kj0jZ0pEmm134uzrQlFvQJLF6","bcrypt"));
console.log(hashcat.verifyHash("hashcat","admin::N46iSNekpT:08ca45b7d7ea58ee:88dcbe4446168966a153a0064958dac6:5c7830315c7830310000000000000b45c67103d07d7b95acd12ffa11230e0000000052920b85f78d013c31cdb3b92f5d765c783030","netntlmv2"));
console.log(hashcat.verifyHash("hashcat","bfd280436f45fa38eaacac3b00518f29:1234","hmac-md5"));
console.log(hashcat.verifyHash("hashcat","d89c92b4400b15c39e462a8caa939ab40c3aeeea:1234","hmac-sha1"));
console.log(hashcat.verifyHash("hashcat","8efbef4cec28f228fa948daaf4893ac3638fbae81358ff9020be1d7a9a509fc6:1234","hmac-sha256"));
console.log(hashcat.verifyHash("hashcat","7cce966f5503e292a51381f238d071971ad5442488f340f98e379b3aeae2f33778e3e732fcc2f7bdc04f3d460eebf6f8cb77da32df25500c09160dd3bf7d2a6b:1234","hmac-sha512"));
console.log(hashcat.verifyHash("hashcat","7196759210defdc0","mysql323"));

Credits and Dependencies