Files
revsuit/internal/newdns/type.go
T
Li4n0 3559894acc feat: complete basic functions
Support http,dns and mysql connection. Support custom http, dns response. Support dns rebinding.
Support mysql load local files and jdbc deserialize exploit.
2021-04-21 18:55:16 +08:00

50 lines
986 B
Go

package newdns
import "github.com/miekg/dns"
// Type denotes the DNS record type.
type Type uint16
const (
// A records return IPV4 addresses.
A = Type(dns.TypeA)
// AAAA records return IPV6 addresses.
AAAA = Type(dns.TypeAAAA)
// CNAME records return other DNS names.
CNAME = Type(dns.TypeCNAME)
// MX records return mails servers with their priorities. The target mail
// servers must itself be returned with an A or AAAA record.
MX = Type(dns.TypeMX)
// TXT records return arbitrary text data.
TXT = Type(dns.TypeTXT)
// NS records delegate names to other name servers.
NS = Type(dns.TypeNS)
// REBINDING records return different ip when the same client requests twice.
REBINDING = Type(99)
)
func (t Type) valid() bool {
switch t {
case A, AAAA, CNAME, MX, TXT, NS, REBINDING:
return true
default:
return false
}
}
func typeInList(list []Type, needle Type) bool {
for _, t := range list {
if t == needle {
return true
}
}
return false
}