https://github.com/uri/brute
brute brute-force crypto data
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/uri/brute
- Owner: uri
- Created: 2017-01-29T21:46:33.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-10T03:34:40.000Z (almost 9 years ago)
- Last Synced: 2025-08-13T03:58:00.450Z (6 months ago)
- Topics: brute, brute-force, crypto, data
- Language: Elixir
- Size: 3.91 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Brute
#### [Documentation](https://hexdocs.pm/brute)
Brute is a package that generates
[combinations](https://en.wikipedia.org/wiki/Combination) of various
characters.
For example, Brute can generate the combinations for the set `{a b c}`:
```elixir
Brute.generic(?a..?c, 1..3)
```
Will generate something similar to the following: a, b , c, ..., z, aa, ab,
..., zy, zz, ... aaa, aab, ..., zzy, zzz.
**There is no order guarantee within set-length**.
Since most functions in `Brute` return a stream, they can combined with other
operations. For example, calculating a hash:
```elixir
'abcdefghijkpqrstuvwxyzABCDEFGHIJKPQRSTUVWXYZ0123456789`~!@#$%^&*()_+{}:<>?"\'`'
|> Brute.generic(1..20)
|> Stream.map(fn str ->
:crypto.hash(:sha, str) |> Base.encode16
end)
```
## Installation
```elixir
def deps do
[{:brute, "~> 0.1.0"}]
end
```
If you are using Elixir 1.3 or lower you will also need to add `brute` to your applications.
```elixir
def application do
[ ... applications: [ ..., :brute ] ]
end
```
## TODO
- [ ] Benchmarks
- [ ] Caching combinations