mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-26 16:41:53 +08:00
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.
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user