Skip to content

Commit

Permalink
version v1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
cuhsat committed Jun 15, 2024
1 parent bd9b813 commit c084e11
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/wth/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -1012,16 +1012,14 @@ var DB = []struct {
},
}

// Search will write the found matches into the give channel.
// Search will write the found matches into the given channel.
//
// The given channel will be closed at the end of the operation.
//
// Search will not return anything.
func Search(hash []byte, ch chan<- string) {
func Search(b []byte, ch chan<- string) {
for _, e := range DB {
re := regexp.MustCompile(e.Regex)

if re.Match(hash) {
if re.Match(b) {
ch <- strings.Join(e.Algos, "\n")
}
}
Expand Down

0 comments on commit c084e11

Please sign in to comment.