https://github.com/umutbasal/crunch-go
crunch-go is go runner for crunch wordlist generator. just builds and runs the binary with given args. https://pkg.go.dev/github.com/umutbasal/crunch-go
https://github.com/umutbasal/crunch-go
brute crunch fuzz wordlist
Last synced: about 1 year ago
JSON representation
crunch-go is go runner for crunch wordlist generator. just builds and runs the binary with given args. https://pkg.go.dev/github.com/umutbasal/crunch-go
- Host: GitHub
- URL: https://github.com/umutbasal/crunch-go
- Owner: umutbasal
- License: mit
- Created: 2022-07-29T00:46:29.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-29T01:00:59.000Z (almost 4 years ago)
- Last Synced: 2025-02-01T16:24:07.522Z (over 1 year ago)
- Topics: brute, crunch, fuzz, wordlist
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# Crunch-go
crunch-go is go runner for crunch wordlist generator. just builds and runs the binary with given args.
## Examples
### Generate From Charset
You can use any charset from lst file.
`hex-lower, hex-upper, numeric, symbols14, symbols14-space, symbols-all, symbols-all-space, ualpha, ualpha-space, ualpha-numeric, ualpha-numeric-space, ualpha-numeric-symbol14, ualpha-numeric-symbol14-space, ualpha-numeric-all, ualpha-numeric-all-space, lalpha, lalpha-space, lalpha-numeric, lalpha-numeric-space, lalpha-numeric-symbol14, lalpha-numeric-symbol14-space, lalpha-numeric-all, lalpha-numeric-all-space, mixalpha, mixalpha-space, mixalpha-numeric, mixalpha-numeric-space, mixalpha-numeric-symbol14, mixalpha-numeric-symbol14-space, mixalpha-numeric-all, mixalpha-numeric-all-space`
```go
package main
import (
"io/ioutil"
"github.com/umutbasal/crunch-go"
)
func main() {
b, err := crunch.GenerateFromCharset(5, 5, "ualpha")
if err != nil {
panic(err)
}
// write to file
err = ioutil.WriteFile("crunch.txt", b, 0644)
if err != nil {
panic(err)
}
}
```
### Custom args
```go
func GenerateFromCharset(start, end int, charset string) ([]byte, error) {
out := fmt.Sprintf("%s/%s", tmpDir, "tmp.txt")
params := fmt.Sprintf("%d %d -f %s/charset.lst %s -o %s", start, end, tmpDir, charset, out)
err := crunch.Run(params)
if err != nil {
return nil, err
}
b, err := ioutil.ReadFile(out)
if err != nil {
return nil, err
}
return b, nil
}
```