Documentation ¶
Index ¶
- Constants
- Variables
- func AllHosts(cidr *net.IPNet) []net.IP
- func AnySubdomainRegex() *regexp.Regexp
- func AnySubdomainRegexString() string
- func CIDRSubset(cidr *net.IPNet, addr string, num int) []net.IP
- func FileExists(path string) bool
- func FilterWildCard(filename string) []string
- func FirstLast(cidr *net.IPNet) (net.IP, net.IP)
- func GenerateFlagIndexFromMap(index uint32) (uint16, uint16)
- func GenerateMapIndex(flagid2 uint16, index uint16) int
- func GetDefaultSubNextData() []string
- func GetGateMacAddress(dvice string) [2]net.HardwareAddr
- func GetIpv4Devices() (keys []string, data map[string]net.IP)
- func GetSubdomainData() string
- func GetWindowWith() int
- func IPDec(ip net.IP)
- func IPInc(ip net.IP)
- func IsContain(items []string, item string) bool
- func IsIPv4(ip net.IP) bool
- func IsIPv6(ip net.IP) bool
- func IsReservedAddress(addr string) (bool, string)
- func IsWildCard(domain string) bool
- func LinesInFile(fileName string) ([]string, error)
- func OutputExcel(filename string)
- func PrintStatus()
- func RandInt64(min, max int64) int64
- func RandomStr(n int) string
- func Range2CIDR(first, last net.IP) *net.IPNet
- func RangeHosts(start, end net.IP) []net.IP
- func Recv(device string, options *Options, flagID uint16, retryChan chan RetryStruct)
- func RequestWebPage(urlstring string, body io.Reader, hvals map[string]string, uid, secret string) (string, error)
- func ShowBanner()
- func Start(options *Options)
- func SubdomainRegex(domain string) *regexp.Regexp
- func SubdomainRegexString(domain string) string
- func Summary()
- type AsnStruct
- type EthTable
- type LocalRetryStruct
- type LocalStruct
- type Options
- type Pair
- type PairList
- type RecvResult
- type RetryStruct
- type Script
- type SendDog
- func (d *SendDog) BuildStatusTable(domain string, dns string, domainlevel int) (uint16, uint16)
- func (d *SendDog) ChoseDns() string
- func (d *SendDog) Close()
- func (d *SendDog) Init(ether EthTable, dns []string, flagID uint16, printStatus bool)
- func (d *SendDog) Lock()
- func (d *SendDog) Send(domain string, dnsname string, srcport uint16, flagid uint16)
- func (d *SendDog) UnLock()
- type Source
- type Stack
- type StatusTable
Constants ¶
const ( // UserAgent is the default user agent used by Amass during HTTP requests. UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36" // Accept is the default HTTP Accept header value used by Amass. Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" // AcceptLang is the default HTTP Accept-Language header value used by Amass. AcceptLang = "en-US,en;q=0.8" SUBRE = "(([a-zA-Z0-9]{1}|[_a-zA-Z0-9]{1}[_a-zA-Z0-9-]{0,61}[a-zA-Z0-9]{1})[.]{1})+" )
const IPv4RE = "((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)[.]){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
IPv4RE is a regular expression that will match an IPv4 address.
const ReservedCIDRDescription = "Reserved Network Address Blocks"
ReservedCIDRDescription is the description used for reserved address ranges.
const Version = "0.7"
Variables ¶
var AsnResults []RecvResult
var DefaultSubdomain = []string{} /* 103750 elements not displayed */
var FaildIndex uint64 = 0
var RecvIndex uint64 = 0
var ReservedCIDRs = []string{
"192.168.0.0/16",
"172.16.0.0/12",
"10.0.0.0/8",
"127.0.0.0/8",
"224.0.0.0/4",
"240.0.0.0/4",
"100.64.0.0/10",
"198.18.0.0/15",
"169.254.0.0/16",
"192.88.99.0/24",
"192.0.0.0/24",
"192.0.2.0/24",
"192.94.77.0/24",
"192.94.78.0/24",
"192.52.193.0/24",
"192.12.109.0/24",
"192.31.196.0/24",
"192.0.0.0/29",
}
ReservedCIDRs includes all the networks that are reserved for special use.
var SentIndex uint64 = 0
var SubNext = []string{} /* 3827 elements not displayed */
var SuccessIndex uint64 = 0
Functions ¶
func AllHosts ¶
AllHosts returns a slice containing all the IP addresses within the CIDR provided by the parameter. This implementation was obtained/modified from the following: https://gist.github.com/kotakanbe/d3059af990252ba89a82
func AnySubdomainRegex ¶
AnySubdomainRegex returns a Regexp object initialized to match any DNS subdomain name.
func AnySubdomainRegexString ¶
func AnySubdomainRegexString() string
AnySubdomainRegexString returns a regular expression string to match any DNS subdomain name.
func CIDRSubset ¶
CIDRSubset returns a subset of the IP addresses contained within the cidr parameter with num elements around the addr element.
func FileExists ¶
func FilterWildCard ¶
func GenerateMapIndex ¶
func GetDefaultSubNextData ¶
func GetDefaultSubNextData() []string
func GetGateMacAddress ¶
func GetGateMacAddress(dvice string) [2]net.HardwareAddr
func GetSubdomainData ¶
func GetSubdomainData() string
func GetWindowWith ¶
func GetWindowWith() int
func IsReservedAddress ¶
IsReservedAddress checks if the addr parameter is within one of the address ranges in the ReservedCIDRs slice.
func IsWildCard ¶
func LinesInFile ¶
func OutputExcel ¶
func OutputExcel(filename string)
func PrintStatus ¶
func PrintStatus()
func Range2CIDR ¶
Range2CIDR turns an IP range into a CIDR.
func RangeHosts ¶
RangeHosts returns all the IP addresses (inclusive) between the start and stop addresses provided by the parameters.
func RequestWebPage ¶
func ShowBanner ¶
func ShowBanner()
func SubdomainRegex ¶
func SubdomainRegexString ¶
SubdomainRegexString returns a regular expression string that matchs subdomain names ending with the domain provided by the parameter.
Types ¶
type EthTable ¶
type EthTable struct { SrcIp net.IP Device string SrcMac net.HardwareAddr DstMac net.HardwareAddr }
func AutoGetDevices ¶
func AutoGetDevices() EthTable
func GetDevices ¶
type LocalRetryStruct ¶
type LocalRetryStruct struct {
// contains filtered or unexported fields
}
type LocalStruct ¶
type LocalStruct struct {
// contains filtered or unexported fields
}
var LocalStauts LocalStruct
func (*LocalStruct) Append ¶
func (this *LocalStruct) Append(node *StatusTable, index uint32)
func (*LocalStruct) Empty ¶
func (this *LocalStruct) Empty() bool
func (*LocalStruct) GetTimeoutData ¶
func (this *LocalStruct) GetTimeoutData(max int) []LocalRetryStruct
从链表中取出超时的数据,可选每次取出最多多少数据
func (*LocalStruct) Len ¶
func (this *LocalStruct) Len() int
Return the number of items in the stack
func (*LocalStruct) SearchFromIndexAndDelete ¶
func (this *LocalStruct) SearchFromIndexAndDelete(index uint32) (LocalRetryStruct, error)
搜索并删除节点
type Options ¶
type Options struct { Rate int64 Domain []string FileName string Resolvers []string Output string OutputCSV bool Test bool NetworkId int ListNetwork bool Silent bool TTL bool Verify bool Stdin bool Debug bool DomainLevel int SkipWildCard bool Summary bool API bool FULL bool SubNameFileName string // 三级域名字典文件 FilterWildCard bool // 过滤泛解析结果 CheckOrigin bool // 会从返回包检查DNS是否为设定的,防止其他包的干扰 }
func ParseOptions ¶
func ParseOptions() *Options
ParseOptions parses the command line flags provided by a user
type RecvResult ¶
type RecvResult struct { Subdomain string Answers []layers.DNSResourceRecord }
接收结果数据结构
type RetryStruct ¶
重发状态数据结构
type Script ¶
type Script struct {
// contains filtered or unexported fields
}
func (*Script) ScriptName ¶
Acquires the script name of the script by accessing the global variable.
type SendDog ¶
type SendDog struct {
// contains filtered or unexported fields
}