Skip to content

Commit

Permalink
optimize print
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowabi committed Jun 27, 2024
1 parent c310954 commit 008a7bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cmd/rootCmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ EndpointSearch is a scanner that probes the endpoint of a cloud service
recordList := pkg.SearchSRVRecord(ipRecordList...)

client := pkg.GenerateHTTPClient(define.TimeOut, define.ProxyURL)
fmt.Println("URL exist:")
respList := pkg.SearchEndpoint(client, portList, recordList...)

resultList := Compare.RemoveDuplicates(rule.JudgeEndpoint(respList...))
fmt.Println("Service endpoint exist:")
fmt.Println("Cloud Service Endpoint URL exist:")
pkg.WriteToFile(resultList, define.OutPut)
fmt.Printf("[+] The output is in %s\n", define.OutPut)
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func WriteToFile(writeResultList []string, output string) {
sort.Strings(writeResultList)
if len(writeResultList) != 0 {
for _, i := range writeResultList {
fmt.Println("[+] service endpoint:", i)
fmt.Println("[+]", i)
fmt.Fprintln(writer, i)
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/req.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func SendHttpRequest(client *http.Client, request string, resultsChan chan Respo
header = append(header, val...)
}
body := Network.HandleResponse(resp)

fmt.Printf("[+] %s\n", requestStr)
resultsChan <- ResponseData{requestStr, header, body}
}
}

0 comments on commit 008a7bf

Please sign in to comment.