Documentation
¶
Index ¶
- Variables
- func AppendAPIKeyToURL(apiUrl string, apiKey string) string
- func MultipartAllDiscoveries(apiKey string, cleannames []string) (map[string]bool, error)
- func ReqHeaderOnly(req http.Request, apiKey string, useActualResolvedName bool) (*http.Response, error)
- func ReqWithBackoff(req *http.Request, client *http.Client) (*http.Response, error)
- func TestKeyServicePair(target TargetKey, service string) (bool, error)
- func TestKeyValidity(apiKey string) (bool, error)
- type ElapsedCombo
- type GoogleErrorResponse
- type ScanUpdate
- type Service
- type TargetKey
Constants ¶
This section is empty.
Variables ¶
View Source
var GetClient = sync.OnceValue(func() *http.Client { return &http.Client{ Transport: &http3.Transport{ EnableDatagrams: true, TLSClientConfig: &tls.Config{ ServerName: "googleapis.com", NextProtos: []string{http3.NextProtoH3}, }, Dial: func(ctx context.Context, addr string, tlsCfg *tls.Config, cfg *quic.Config) (*quic.Conn, error) { hostAddr, _ := net.ResolveUDPAddr("udp4", "0.0.0.0:0") listener, err := net.ListenUDP("udp", hostAddr) if err != nil { log.Printf("Failed to listen on local port - try raising ulimit? Error: %v", err) } var udpAddr *net.UDPAddr udpAddr, err = net.ResolveUDPAddr("udp", addr) if err != nil { log.Printf("Failed to resolve %s", addr) return nil, err } StoredResolvedAddr = udpAddr return quic.Dial(ctx, listener, udpAddr, tlsCfg, cfg) }, }, Timeout: 20 * time.Second, } })
View Source
var GoogleApiList = []string{}/* 501 elements not displayed */
View Source
var KeyLogFile os.File
View Source
var StoredResolvedAddr *net.UDPAddr
Functions ¶
func AppendAPIKeyToURL ¶
Parse query params and append the API key to it.
func MultipartAllDiscoveries ¶
WIP - just need to figure out how to use this damn thing I was hoping to be able to multipart it and send multiple services with one big payload. But I might just remove this. Http3 lets me send the data in one big stream, there's no need for this anymore. Still, it has potential for other uses if I keep digging.
func ReqHeaderOnly ¶
func ReqHeaderOnly(req http.Request, apiKey string, useActualResolvedName bool) (*http.Response, error)
For handling errors with a retry for the connection stream itself - otherwise i'd be limited to retrying the domain name resolution / dial
func ReqWithBackoff ¶
func TestKeyValidity ¶
Types ¶
type ElapsedCombo ¶
func ScanServices ¶
func ScanServices(target TargetKey, gapiServices []Service, blacklisted []string, falsePos []string, workerCount int, timingEnabled bool, updateCh chan<- ScanUpdate) ([]string, int, *ElapsedCombo)
type GoogleErrorResponse ¶
type GoogleErrorResponse struct {
Error *struct {
Message string `json:"message"`
} `json:"error"`
}
type ScanUpdate ¶
Click to show internal directories.
Click to hide internal directories.