# fbrute

> Fast generator of character combinations for a given alphabet and length

Latest version **1.0.1** (published 2021-06-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install fbrute
pnpm add fbrute
yarn add fbrute
bun add fbrute
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-06-18 |
| First published | 2021-06-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=7.6.0 |
| Dependencies | 0 |
| Unpacked size | 11.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | cotenochek |
| Maintainers | cotenochek |
| Keywords | fbrute, brute, force, bruteforce, fast-bruteforce, fast |

## Links

- npm: https://www.npmjs.com/package/fbrute
- Repository: https://github.com/StormExecute/fbrute
- Homepage: https://github.com/StormExecute/fbrute/#readme
- Issues: https://github.com/StormExecute/fbrute/issues
- npm.io page: https://npm.io/package/fbrute

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2021-06-18
- 1.0.0 — 2021-06-17

## README

# fbrute (fast-bruteforce) [![NPM version][npm-image]][npm-url]

Fast generator of character combinations for a given alphabet and length.

# Description

In fact, this generator iterates over all possible character combinations using the capabilities of the lowest level of the language to achieve improved performance.

# Table of Contents

* [Install](#install)
* [Usage](#usage)
* [Performance benchmark](#benchmark)
* [API](#api)
* [Contacts](#contacts)

<div id='install'></div>

# Install

```bash
$ npm install fbrute
```

<div id='usage'></div>

# Usage

```javascript

const fBrute = require("fbrute");

fBrute.bruteForce("abcd", 4, str => console.log(str.join("")));

```

<div id='benchmark'></div>

# Performance benchmark

```bash

bruteforce x 6,968 ops/sec +1.01% (81 runs sampled)
bruteforcejs x 18,764 ops/sec +0.89% (84 runs sampled)
node-bruteforce x 18,966 ops/sec +1.40% (86 runs sampled)
bruteforcer x 79,761 ops/sec +6.37% (72 runs sampled)
brutee x 14,057 ops/sec +0.89% (90 runs sampled)
bruter x 22,928 ops/sec +2.17% (85 runs sampled)
fBrute x 99,161 ops/sec +1.19% (85 runs sampled)

Fastest is fBrute

```

To run benchmark:

```bash
npm run benchmark
```

<div id='api'></div>

# API

Types: [HERE!](https://github.com/StormExecute/fbrute/blob/master/index.d.ts)

### fBrute.bruteForce(alphabet: string, l: number, cb: (str: string[]) => undefined) => undefined
The main function that starts brute-force

### fBrute.bruteForceWithStop(alphabet: string, l: number, cb: (str: string[]) => boolean | undefined) => undefined
The same as bruteForce, only it can stop if the callback returns true

### fBrute.bruteForceWithAsyncStop(alphabet: string, l: number, cb: (str: string[]) => boolean | undefined) => undefined
Same as bruteForceWithStop only with asynchronous support

### fBrute.multiBruteForce(longToShorter: boolean, alphabet: string, l: number, cb: (str: string[]) => undefined) => undefined
Launches fBrute.bruteForce at all possible lengths

### fBrute.multiBruteForceWithStop(longToShorter: boolean, alphabet: string, l: number, cb: (str: string[]) => boolean | undefined, returnEverything: boolean) => boolean | boolean[]
The same as multiBruteForce, only it can stop if the callback returns true

### fBrute.multiBruteForceWithAsyncStop(longToShorter: boolean, alphabet: string, l: number, cb: (str: string[]) => boolean | undefined, returnEverything: boolean) => boolean | boolean[]
Same as multiBruteForceWithStop only with asynchronous support

<div id='contacts'></div>

# Contacts

**Yandex Mail** - vladimirvsevolodovi@yandex.ru

**Github** - https://github.com/StormExecute/

# Platforms

**Github** - https://github.com/StormExecute/fbrute/

**NPM** - https://www.npmjs.com/package/fbrute/

# License

**MIT** - https://mit-license.org/

[npm-url]: https://www.npmjs.com/package/fbrute
[npm-image]: https://img.shields.io/npm/v/fbrute.svg

---
_Source: https://npm.io/package/fbrute · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
