zoomeye

package module
v0.0.0-...-f6e39f3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2016 License: GPL-3.0 Imports: 4 Imported by: 0

README

zoomeye-api

zoomeye api by golang

install

go get github.com/nfalse/zoomeye-api

Reference

As the official website, the interfaces provided encapsulation are below:

Documentation

Overview

*********************************************************

  • Author : nfalse
  • Email : nfalse@163.com
  • Last modified : 2016-04-26 10:28
  • Filename : zoomeye.go
  • Description :
  • ******************************************************

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConditionGet

func ConditionGet(url, search_type, condition string, token Token) (result []byte, err error)

func ResourcesInfo

func ResourcesInfo(url string, token Token) (result string, err error)

Types

type HostAnswer

type HostAnswer struct {
	Matches []struct {
		Geoinfo struct {
			City struct {
				GeonameID int `json:"geoname_id"`
				Names     struct {
					ZhCn string `json:"zh-CN"`
					En   string `json:"en"`
				} `json:"names"`
			} `json:"city"`
			Country struct {
				GeonameID int    `json:"geoname_id"`
				Code      string `json:"code"`
				Names     struct {
					ZhCn string `json:"zh-CN"`
					En   string `json:"en"`
				} `json:"names"`
			} `json:"country"`
			Isp       string `json:"isp"`
			Continent struct {
				GeonameID int    `json:"geoname_id"`
				Code      string `json:"code"`
				Names     struct {
					ZhCn string `json:"zh-CN"`
					En   string `json:"en"`
				} `json:"names"`
			} `json:"continent"`
			Subdivisions struct {
				GeonameID int    `json:"geoname_id"`
				Code      string `json:"code"`
				Names     struct {
					ZhCn string `json:"zh-CN"`
					En   string `json:"en"`
				} `json:"names"`
			} `json:"subdivisions"`
			Location struct {
				Lat float64 `json:"lat"`
				Lon float64 `json:"lon"`
			} `json:"location"`
			Organization string `json:"organization"`
			Aso          string `json:"aso"`
			Asn          int    `json:"asn"`
		} `json:"geoinfo"`
		IP       string `json:"ip"`
		Portinfo struct {
			Product   string `json:"product"`
			Hostname  string `json:"hostname"`
			Service   string `json:"service"`
			Os        string `json:"os"`
			Extrainfo string `json:"extrainfo"`
			Version   string `json:"version"`
			Device    string `json:"device"`
			Banner    string `json:"banner"`
			Port      int    `json:"port"`
		} `json:"portinfo"`
		Timestamp string `json:"timestamp"`
	} `json:"matches"`
	Facets struct {
		App []struct {
			Count    int    `json:"count"`
			App      string `json:"app"`
			Versions []struct {
				Count   int    `json:"count"`
				Version string `json:"version"`
			} `json:"versions"`
		} `json:"app"`
		Os []struct {
			Count int    `json:"count"`
			Os    string `json:"os"`
		} `json:"os"`
	} `json:"facets"`
	Total int `json:"total"`
}

func HostSearch

func HostSearch(url, condition string, token Token) (answer HostAnswer, err error)

type Token

type Token struct {
	AccessToken string `json:"access_token"`
}

func Login

func Login(url, user, password string) (token Token, err error)

type User

type User struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type WebtAnswer

type WebtAnswer struct {
	Matches []struct {
		Geoinfo struct {
			City struct {
				Names struct {
					ZhCn string `json:"zh-CN"`
					En   string `json:"en"`
				} `json:"names"`
			} `json:"city"`
			Asn      int `json:"asn"`
			Location struct {
				Lat float64 `json:"lat"`
				Lon float64 `json:"lon"`
			} `json:"location"`
			Continent struct {
				Code  string `json:"code"`
				Names struct {
					ZhCn string `json:"zh-CN"`
					En   string `json:"en"`
				} `json:"names"`
			} `json:"continent"`
			Country struct {
				Code  string `json:"code"`
				Names struct {
					ZhCn string `json:"zh-CN"`
					En   string `json:"en"`
				} `json:"names"`
			} `json:"country"`
		} `json:"geoinfo"`
		CheckTime string   `json:"check_time"`
		Language  []string `json:"language"`
		Title     string   `json:"title"`
		IP        []string `json:"ip"`
		Plugin    []struct {
			Version string `json:"version"`
			Based   string `json:"based"`
			Name    string `json:"name"`
			Chinese string `json:"chinese"`
		} `json:"plugin"`
		Db []struct {
			Version interface{} `json:"version"`
			Name    string      `json:"name"`
			Chinese string      `json:"chinese"`
		} `json:"db"`
		Site     string `json:"site"`
		Headers  string `json:"headers"`
		Keywords string `json:"keywords"`
		Webapp   []struct {
			URL     string `json:"url"`
			Version string `json:"version"`
			Name    string `json:"name"`
			Chinese string `json:"chinese"`
		} `json:"webapp"`
		Domains     []string `json:"domains"`
		Description string   `json:"description"`
	} `json:"matches"`
	Total int `json:"total"`
}

func WebSearch

func WebSearch(url, condition string, token Token) (answer WebtAnswer, err error)

Directories

Path Synopsis
********************************************************* * Author : nfalse * Email : nfalse@163.com * Last modified : 2016-04-26 10:28 * Filename : main.go * Description : * ******************************************************
********************************************************* * Author : nfalse * Email : nfalse@163.com * Last modified : 2016-04-26 10:28 * Filename : main.go * Description : * ******************************************************

Jump to

Keyboard shortcuts

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