Documentation ¶
Index ¶
- func IsAWSARN(target string) bool
- func IsAWSAccount(target string) bool
- func IsCIDR(target string) bool
- func IsDockerImage(target string) bool
- func IsDomainName(target string) (bool, error)
- func IsGCPProjectID(target string) bool
- func IsGitRepository(target string) bool
- func IsHost(target string) bool
- func IsHostname(target string) bool
- func IsHostnameNoDNSResolution(target string) bool
- func IsIP(target string) bool
- func IsURL(target string) bool
- func IsWebAddress(target string) bool
- type AssetType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAWSAccount ¶ added in v1.1.0
IsAWSAccount returns true if the target is an AWS account.
func IsDockerImage ¶
IsDockerImage returns true if the target is a Docker image.
The registry must be specified, while the tag is optional:
- Valid: registry.hub.docker.com/metasploitframework/metasploit-framework:latest
- Valid: registry.hub.docker.com/metasploitframework/metasploit-framework
- Valid: registry.hub.docker.com/library/debian
- Valid: registry.hub.docker.com/path1/path2/artifact (compliant with V2 spec)
- Valid: registry.hub.docker.com/artifact (compliant with V2 spec)
- Valid: localhost:5500/library/debian
- Valid: registry-1.docker.io/library/postgres:latest
- Valid: docker.io/library/busybox
- Valid: ghcr.io/puppeteer/puppeteer
- Not valid: metasploitframework/metasploit-framework:latest
- Not valid: metasploitframework/metasploit-framework
- Not valid: debian
func IsDomainName ¶
IsDomainName returns true if a query to a domain server returns a SOA record for the target.
func IsGCPProjectID ¶ added in v1.1.1
IsGCPProjectID returns true if the target is a GCP Project.
A GCP project id is the unique, user-assigned id of the project. It must be 6 to 30 lowercase ASCII letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited.
Valid: googleproject Valid: google-project Valid: google-project123 Valid: google-123-project Not valid: googleProject Not valid: google_project Not valid: google-project- Not valid: 123-google-project
func IsGitRepository ¶
IsGitRepository returns true if the target has the format of a Git repository.
func IsHostname ¶
IsHostname returns true if the target is not an IP but can be resolved to an IP.
func IsHostnameNoDNSResolution ¶ added in v1.2.12
IsHostnameNoDNSResolution returns true if the target is not an IP.
func IsURL ¶
IsURL returns true if the target is an absolute URL (it has a non-empty scheme).
This method is kept to don't break compatibility, use IsWebAddress instead.
func IsWebAddress ¶
IsWebAddress returns true if the target is an absolute URL.
- It has a non-empty scheme (http or https)
- It has a non-empty hostname
Types ¶
type AssetType ¶ added in v1.1.0
type AssetType string
const ( AWSAccount AssetType = "AWSAccount" DockerImage AssetType = "DockerImage" GitRepository AssetType = "GitRepository" IP AssetType = "IP" IPRange AssetType = "IPRange" DomainName AssetType = "DomainName" Hostname AssetType = "Hostname" WebAddress AssetType = "WebAddress" )
Asset types for vulcan assets.
func DetectAssetTypes ¶ added in v1.1.0
DetectAssetTypes detects the asset types from an identifier.
func Parse ¶ added in v1.1.0
Parse parses a string representing an asset type into an AssetType. It returns error if the provided string does not match any known asset type.