recon

package module
v0.0.0-...-c943d78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2018 License: Apache-2.0 Imports: 15 Imported by: 4

README

recon

Go Package for Network Reconnaissance

Documentation

Index

Constants

View Source
const (
	USER_AGENT  = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
	ACCEPT      = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
	ACCEPT_LANG = "en-US,en;q=0.8"
)
View Source
const SUBRE = "(([a-zA-Z0-9]{1}|[a-zA-Z0-9]{1}[a-zA-Z0-9-]{0,61}[a-zA-Z0-9]{1})[.]{1})+"

Variables

This section is empty.

Functions

func ASNToNetblocks

func ASNToNetblocks(asn int) ([]string, error)

func DNSExchange

func DNSExchange(client *dns.Client, req *request)

func GetARecordData

func GetARecordData(answers []DNSAnswer) string

Goes through the DNS answers looking for A and AAAA records, and returns the first Data field found for those types

func GetJSONPage

func GetJSONPage(u string) string

func GetWebPage

func GetWebPage(u string) string

func NewUniqueElements

func NewUniqueElements(orig []string, add ...string) []string

func PostForm

func PostForm(u string, params url.Values) string

func PostXMLWeb

func PostXMLWeb(u, body string) string

func ReverseDNS

func ReverseDNS(ip, server string) (string, error)

func ReverseWhois

func ReverseWhois(domain string) []string

ReverseWhois - Returns a slice of domain names related to the domain provided

func UniqueAppend

func UniqueAppend(orig []string, add ...string) []string

Types

type ASRecord

type ASRecord struct {
	ASN    int
	Prefix string
	ASName string
	CN     string
	ISP    string
}

func IPToASRecord

func IPToASRecord(ip string) (*ASRecord, error)

func IPToCIDR

func IPToCIDR(addr string) (*ASRecord, *net.IPNet, error)

type DNSAnswer

type DNSAnswer struct {
	Name string `json:"name"`
	Type int    `json:"type"`
	TTL  int    `json:"TTL"`
	Data string `json:"data"`
}

func GoogleResolveDNS

func GoogleResolveDNS(name, t string) ([]DNSAnswer, error)

func ResolveDNS

func ResolveDNS(name, server, qtype string) ([]DNSAnswer, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL