From 942c4e81c3199fad8b1ece8b6980a5e458f2341a Mon Sep 17 00:00:00 2001 From: Gregory Boddin Date: Tue, 6 Oct 2020 17:28:29 +0200 Subject: [PATCH] fmt: Added new leakix-ns tool for basic dns recon --- cmd/leakix-ns/main.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/cmd/leakix-ns/main.go b/cmd/leakix-ns/main.go index 982c4ff..aa8f956 100644 --- a/cmd/leakix-ns/main.go +++ b/cmd/leakix-ns/main.go @@ -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++ @@ -95,4 +95,4 @@ func (app *App) Run() { fmt.Println() } } -} \ No newline at end of file +}