Skip to content

Commit

Permalink
implementing whois query and layout, adding concurrency in a bunch of…
Browse files Browse the repository at this point in the history
… places
  • Loading branch information
CyberRoute committed Nov 16, 2023
1 parent 95a5b5b commit ce1c2f1
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
19 changes: 19 additions & 0 deletions cmd/bruter/concurrency.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package main

import (
"sync"
)

func RunConcurrently(tasks ...func()) {
var wg sync.WaitGroup
wg.Add(len(tasks))

for _, task := range tasks {
go func(t func()) {
defer wg.Done()
t()
}(task)
}

wg.Wait()
}
20 changes: 20 additions & 0 deletions templates/whois.page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{template "base" .}}

{{define "content"}}
<div class="container-fluid">
<div class="row">
<div class="col">
<div class="card bg-dark text-light mb-4">
<div class="card-body">
<div class="card-header bg-success">
<h5><i class="bi bi-search"></i> WHOIS Information</h5>
</div>
<div class="mt-3">
<p class="text-break">{{.WhoisInfo}}</p>
</div>
</div>
</div>
</div>
</div>
</div>
{{end}}

0 comments on commit ce1c2f1

Please sign in to comment.