INNER CODE UNIT · Go

sanitizePrivateIPs

projectdiscovery/cloudlist · internal/runner/runner.go:281

func sanitizePrivateIPs(resource *schema.Resource, exclude bool) {
	if !exclude || resource == nil {
		return
	}
	resource.PrivateIpv4 = ""
	resource.PrivateIpv6 = ""

	if isPrivateIP(resource.PublicIPv4) {
		resource.PublicIPv4 = ""
	}
	if isPrivateIP(resource.PublicIPv6) {
		resource.PublicIPv6 = ""
	}
}

var (
	ipValidatorOnce sync.Once
	ipValidator     *validate.Validator

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…