cmd

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Copyright © 2021 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2021 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2021 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2021 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const ShodanURL string = "https://api.shodan.io"
View Source
const VtURL string = "https://www.virustotal.com/api/v3"

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(input string)

func Base64Encode

func Base64Encode(choice string)

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately.

func Rdns

func Rdns(choice string)

func Sanitize

func Sanitize(choice string)

func Setenv

func Setenv(key string)

func Unsanitize

func Unsanitize(choice string)

func UrlDecode

func UrlDecode(choice string)

func UrlEncode

func UrlEncode(choice string)

func Whois

func Whois(choice string)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(apiKey string) *Client

func (*Client) HostSearch

func (s *Client) HostSearch(q string, jarm chan string)

func (*Client) Pivot

func (s *Client) Pivot(fp string)

func (*Client) VTLookup

func (s *Client) VTLookup(key string)

type FullList

type FullList struct {
	FullList []struct {
		Attribute struct {
			Type  string `json:"type_description"`
			Name  string `json:"meaningful_name"`
			Magic string `json:"magic"`
			Whois string `json:"whois"`
			Stats struct {
				Malicious int `json:"malicious"`
			} `json:"last_analysis_stats"`
			ASN      int    `json:"asn"`
			AS_Owner string `json:"as_owner"`
			Sha256   struct {
				Fingerprint string `json:"thumbprint_sha256"`
			} `json:"last_https_certificate"`
		} `json:"attributes"`
		Type  string `json:"type"`
		Links []struct {
			Self string `json:"self"`
		} `json:"links"`
	} `json:"data"`
	Meta struct {
		Count int `json:"count"`
	} `json:"meta"`
}

type Host

type Host struct {
	RegionCode  string   `json:"region_code"`
	IP          int      `json:"ip"`
	AreaCode    int      `json:"area_code"`
	Latitude    float64  `json:"latitude"`
	Hostnames   []string `json:"hostnames"`
	PostalCode  string   `json:"postal_code"`
	DmaCode     int      `json:"dma_code"`
	CountryCode string   `json:"country_code"`
	Org         string   `json:"org"`
	Data        []struct {
		Product string `json:"product"`
		Title   string `json:"title"`
		Opts    struct {
		} `json:"opts"`
		Timestamp string   `json:"timestamp"`
		Isp       string   `json:"isp"`
		Cpe       []string `json:"cpe"`
		Data      string   `json:"data"`
		HTML      string   `json:"html"`
		Location  struct {
			City         string  `json:"city"`
			RegionCode   string  `json:"region_code"`
			AreaCode     int     `json:"area_code"`
			Longitude    float64 `json:"longitude"`
			CountryCode3 string  `json:"country_code3"`
			Latitude     float64 `json:"latitude"`
			PostalCode   string  `json:"postal_code"`
			DmaCode      int     `json:"dma_code"`
			CountryCode  string  `json:"country_code"`
			CountryName  string  `json:"country_name"`
		} `json:"location"`
		SSL struct {
			Cert struct {
				SslFingerprint struct {
					SHA1   string `json:"sha1"`
					SHA256 string `json:"sha256"`
				}
				Issuer struct {
					C            string `json:"C,omitempty"`
					CN           string `json:"CN,omitempty"`
					DC           string `json:"DC,omitempty"`
					L            string `json:"L,omitempty"`
					O            string `json:"O,omitempty"`
					OU           string `json:"OU,omitempty"`
					SN           string `json:"SN,omitempty"`
					ST           string `json:"ST,omitempty"`
					EmailAddress string `json:"emailAddress,omitempty"`
					SerialNumber string `json:"serialNumber,omitempty"`
				} `json:"issuer"`
				Serial  int `json:"serial"`
				Subject struct {
					CN string `json:"CN"`
				} `json:"subject"`
			} `json:"cert"`
			Ja3s string `json:"ja3s"`
			Jarm string `json:"jarm"`
		} `json:"ssl"`
		IP        int         `json:"ip"`
		Domains   []string    `json:"domains"`
		Org       string      `json:"org"`
		Os        interface{} `json:"os"`
		Port      int         `json:"port"`
		Hostnames []string    `json:"hostnames"`
		IPStr     string      `json:"ip_str"`
	} `json:"data"`
	City         string      `json:"city"`
	Isp          string      `json:"isp"`
	Longitude    float64     `json:"longitude"`
	LastUpdate   string      `json:"last_update"`
	CountryCode3 string      `json:"country_code3"`
	CountryName  string      `json:"country_name"`
	IPStr        string      `json:"ip_str"`
	Os           interface{} `json:"os"`
	Ports        []int       `json:"ports"`
}

type Query

type Query struct {
	Matches []string `json:"matches"`
	Total   int      `json:"total"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL