Documentation ¶
Index ¶
- Constants
- func GetResultQueryUsage() string
- type ApiDomainsResponse
- type ApiMetaResponse
- type ApiResultsResponse
- type Credentials
- type Domains
- type OprClient
- func (c *OprClient) DoRequest(req *http.Request) (*[]byte, error)
- func (op *OprClient) FetchDomains(c *cli.Context) error
- func (op *OprClient) FetchResults(c *urfavcli.Context, domain string) error
- func (opr *OprClient) GetAsn(input ...string) (*asn.AsnResponse, error)
- func (c *OprClient) NewRequest(method string, resource string, qs *url.Values, headers map[string]string) (*http.Request, error)
- func (op *OprClient) SetupConfig() error
- func (c *OprClient) WithBaseUrl(url string)
- type OprClientParams
- type ScanResult
Constants ¶
View Source
const CONFIG_FILE = "credentials.toml"
View Source
const CONFIG_PATH = ".config/oprand/"
Variables ¶
This section is empty.
Functions ¶
func GetResultQueryUsage ¶
func GetResultQueryUsage() string
GetResultQueryUsage generates the text describing the `results` command usage.
Types ¶
type ApiDomainsResponse ¶
type ApiDomainsResponse struct { Results []Domains `json:"results"` Meta ApiMetaResponse `json:"meta"` }
type ApiMetaResponse ¶
ApiMetaResponse is common to all API responses
type ApiResultsResponse ¶
type ApiResultsResponse struct { Results []ScanResult `json:"results"` Meta ApiMetaResponse `json:"meta"` }
type Credentials ¶
type OprClient ¶
type OprClient struct { AllowedResultsKeywords []string // contains filtered or unexported fields }
func New ¶
func New(params OprClientParams) *OprClient
func (*OprClient) FetchDomains ¶
FetchDomains does an authenticated network request to fetch the domains registered under the user's account.
func (*OprClient) FetchResults ¶
FetchResults does an authenticated network request to fetch the scan results for a given domain.
func (*OprClient) GetAsn ¶
func (opr *OprClient) GetAsn(input ...string) (*asn.AsnResponse, error)
GetAsn connects to the oprand.com/asn API to return the ASN data related to the inputs given.
func (*OprClient) NewRequest ¶
func (c *OprClient) NewRequest(method string, resource string, qs *url.Values, headers map[string]string) (*http.Request, error)
NewRequest forges a new HTTP requests, with authentication signature if required
func (*OprClient) SetupConfig ¶
SetupConfig lets user input their API crendetials and saves them in a file. This credential file will be read when needed to authenticate network requests.
func (*OprClient) WithBaseUrl ¶
type OprClientParams ¶
type ScanResult ¶
type ScanResult struct { Domain string `json:"domain"` Fuzzer string `json:"fuzzer"` FuzzedDomain string `json:"fuzzed_domain"` FuzzedDomainUnicode string `json:"fuzzed_domain_unicode"` ScannedAt time.Time `json:"scanned_at"` DnsA []string `json:"dns_a"` DnsAAAA []string `json:"dns_aaaa"` DnsTXT []string `json:"dns_txt"` DnsMX []string `json:"dns_mx"` DnsNS []string `json:"dns_ns"` DnsCNAME []string `json:"dns_cname"` DnsSPF *string `json:"dns_spf"` DnsDMARC *string `json:"dns_dmarc"` DnsDKIM *string `json:"dns_dkim"` DnsBIMI *string `json:"-"` WhoisRegisteredAt *string `json:"whois_created"` WhoisUpdatedAt *string `json:"whois_updated"` WhoisExpiringAt *string `json:"whois_expiring"` WhoisAbuseEmail *string `json:"whois_abuse_email"` WhoisAbusePhone *string `json:"whois_abuse_phone"` WhoisRegistrarName *string `json:"whois_registrar"` WhoisRegistrarIanaId *string `json:"whois_registrar_iana_id"` WhoisRegistrantName *string `json:"whois_registrant_name"` WhoisRegistrantId *string `json:"whois_registrant_id"` WhoisRegistrantAddress *string `json:"whois_registrant_address"` WhoisRegistrantEmail *string `json:"whois_registrant_email"` WhoisRegistrantCountry *string `json:"whois_registrant_country"` WebHasHttpServer bool `json:"web_has_http_server"` WebStartUrl *string `json:"web_start_url"` WebEndUrl *string `json:"web_end_url"` WebRedirectToDomain bool `json:"web_redirect_to_domain"` WebPageContainsDomain bool `json:"web_page_contains_domain"` WebPageContainsBrandName bool `json:"web_page_contains_brand_name"` WebHasCredentialHarvester bool `json:"web_has_credential_harvester"` WebHttpStatusCode *int `json:"web_http_status_code"` WebHtmlTitle *string `json:"web_html_title"` WebBannerHttp *string `json:"banner_http"` WebLang *string `json:"web_lang"` SslIssuerOrg *string `json:"ssl_issuer_org"` SslIssuerCountry *string `json:"ssl_issuer_country"` SslIssuerAddr *string `json:"ssl_issuer_addr"` SslIssuerCommonName *string `json:"ssl_issuer_common_name"` SslIssuerRfc2253Name *string `json:"ssl_issuer_rfc_2253_name"` SslSubjectRfc2253Name *string `json:"ssl_subject_rfc_2253_name"` SslCertNotBefore *time.Time `json:"ssl_cert_not_before"` SslCertNotAfter *time.Time `json:"ssl_cert_not_after"` SslCertSig *string `json:"ssl_cert_sig"` SslCertSigAlg *string `json:"ssl_cert_sig_alg"` // Expanded scan results info for human-friendly format WhoisRegistrarAnyInfo bool WhoisRegistrantAnyInfo bool AbuseInfoAny bool SslIsCertValid bool SslAnyInfo bool WhoisRegisteredAtSince string WhoisUpdatedAtSince string WhoisExpiringAtSince string ScannedAtSince string }
Click to show internal directories.
Click to hide internal directories.