gobf is a simple library that generates brute force string patterns.
Go 1.15
go get github.com/hlts2/gobf
package main
import (
"context"
"log"
"github.com/hlts2/gobf"
)
func main() {
bf, err := gobf.New(
gobf.WithNumber(true),
gobf.WithUpper(true),
gobf.WithLower(true),
gobf.WithSize(4),
gobf.WithConcrencyLimit(1000000),
)
if err != nil {
log.Fatal(err)
}
log.Println("start to search pattern: s3Df")
err = bf.Do(context.Background(), func(pattern string) {
if pattern == "s3Df" {
log.Printf("find: %s\n", pattern)
}
})
if err != nil {
log.Fatal(err)
}
}
You can use options to change the type of string generated.
// Generate a pattern of four-letter lowercase and number combinations.
bf, err := gobf.New(
gobf.WithNumber(true),
// gobf.WithUpper(true),
gobf.WithLower(true),
gobf.WithSize(4),
)
- Fork it ( https://github.com/hlts2/gobf/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request