Skip to content

Commit

Permalink
Adds the bufferoverrun source
Browse files Browse the repository at this point in the history
  • Loading branch information
tomnomnom committed Sep 9, 2019
1 parent a4e93ae commit da52237
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Please feel free to issue pull requests with new sources! :)
* hackertarget
* threatcrowd
* wayback machine
* dns.bufferover.run
* facebook
* Needs `FB_APP_ID` and `FB_APP_SECRET` environment variables set
* You need to be careful with your app's rate limits
Expand Down
27 changes: 27 additions & 0 deletions bufferoverrun.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package main

import (
"fmt"
"strings"
)

func fetchBufferOverrun(domain string) ([]string, error) {
out := make([]string, 0)

fetchURL := fmt.Sprintf("https://dns.bufferover.run/dns?q=.%s", domain)

wrapper := struct {
Records []string `json:"FDNS_A"`
}{}
err := fetchJSON(fetchURL, &wrapper)
if err != nil {
return out, err
}

for _, r := range wrapper.Records {
parts := strings.SplitN(r, ",", 2)
out = append(out, parts[1])
}

return out, nil
}
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func main() {
fetchVirusTotal,
fetchFindSubDomains,
fetchUrlscan,
fetchBufferOverrun,
}

out := make(chan string)
Expand Down

0 comments on commit da52237

Please sign in to comment.