Skip to content

Commit

Permalink
fmt: Added new leakix-ns tool for basic dns recon
Browse files Browse the repository at this point in the history
  • Loading branch information
gboddin committed Oct 6, 2020
1 parent 3b0c1b9 commit 942c4e8
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions cmd/leakix-ns/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@ func main() {
}

type App struct {
Domain string
Domain string
OutputJson bool
Limit int
Searcher *LeakIXClient.SearchResultsClient
Reverse map[string][]LeakIXClient.SearchResult
Forward map[string][]LeakIXClient.SearchResult
Limit int
Searcher *LeakIXClient.SearchResultsClient
Reverse map[string][]LeakIXClient.SearchResult
Forward map[string][]LeakIXClient.SearchResult
}

func (app *App) Run() {
app.Searcher = &LeakIXClient.SearchResultsClient{
Scope: "service",
Query: fmt.Sprintf("hostname:\"%s\" OR reverse:\"%s\" OR ip:\"%s\"", app.Domain, app.Domain, app.Domain),
Scope: "service",
Query: fmt.Sprintf("hostname:\"%s\" OR reverse:\"%s\" OR ip:\"%s\"", app.Domain, app.Domain, app.Domain),
}
app.Reverse = make(map[string][]LeakIXClient.SearchResult)
app.Forward = make(map[string][]LeakIXClient.SearchResult)
count := 0
for app.Searcher.Next() {
if ! strings.Contains(app.Searcher.SearchResult().Reverse, app.Domain) &&
! strings.Contains(app.Searcher.SearchResult().Hostname, app.Domain) &&
! strings.Contains(app.Searcher.SearchResult().Ip, app.Domain){
if !strings.Contains(app.Searcher.SearchResult().Reverse, app.Domain) &&
!strings.Contains(app.Searcher.SearchResult().Hostname, app.Domain) &&
!strings.Contains(app.Searcher.SearchResult().Ip, app.Domain) {
continue
}
count++
Expand Down Expand Up @@ -95,4 +95,4 @@ func (app *App) Run() {
fmt.Println()
}
}
}
}

0 comments on commit 942c4e8

Please sign in to comment.