-
Notifications
You must be signed in to change notification settings - Fork 0
/
struct.go
157 lines (141 loc) · 3.85 KB
/
struct.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
package zoomeye
// user login
type Login struct {
Username string `json:"username"`
Password string `json:"password"`
}
// zoomeye token
type Token struct {
AccessToken string `json:"access_token"`
}
// zoomeye user
type User struct {
Login
Token
}
// account resources info
type ResourcesInfo struct {
// Account plan e.g. developer
Plan string `json:"plan"`
// Remaining resources amount
Resources struct {
Host string `json:"host-search"`
Web string `json:"web-search"`
}
}
// Host search return
type HostSearchInfo struct {
// total count of query results
Total int `json:"total"`
// A comma-separated list of properties to get summary information on query
Facets interface{} `json:"facets"`
// result host info
Matches []Matches `json:"matches"`
// The amount that your account can get
Available int `json:"available"`
}
// Web search return
type WebSearchInfo struct {
// total count of query results
Total int `json:"total"`
// A comma-separated list of properties to get summary information on query
Facets interface{} `json:"facets"`
// result site info
Matches []WebMatches `json:"matches"`
// The amount that your account can get
Available int `json:"available"`
}
type Matches struct {
// host ip
Ip string `json:"ip"`
// Access protocol information
Protocol Protocol `json:"protocol"`
// Port info
PortInfo PortInfo `json:"portinfo"`
// Geographic information
GeoInfo GeoInfo `json:"geoinfo"`
Timestamp string `json:"timestamp"`
}
type WebMatches struct {
// May be a domain name or ip
Site string `json:"site"`
// site domain
Domains []string `json:"domains"`
// site ip
Ip []string `json:"ip"`
// site descript
Description string `json:"description"`
// response http header
Headers string `json:"headers"`
// site title
Title string `json:"title"`
// Geographic information
GeoInfo GeoInfo `json:"geoinfo"`
Timestamp string `json:"timestamp"`
// Web Composents
Components []Component `json:"component"`
// site programming language
Language []string `json:"language"`
// site system
System []string `json:"system"`
// site database
Db []string `json:"db"`
// site use programming framework
Framework []string `json:"framework"`
// site waf
Waf []string `json:"waf"`
// site app
Webapp []string `json:"webapp"`
// site http server
Server []Component `json:"server"`
}
type Protocol struct {
Application string `json:"application"`
Probe string `json:"probe"`
Transport string `json:"transport"`
}
// Web Component info e.g PHP
type Component struct {
// Component version
Version string `json:"version"`
// Component English name
Name string `json:"name"`
// Component China name
Chinese string `json:"chinese"`
}
type GeoInfo struct {
Asn int `json:"asn"`
Isp string `json:"isp"`
Organization string `json:"organization"`
Aso string `json:"aso"`
City AddressInfo `json:"city"`
Country AddressInfo `json:"country"`
Continent AddressInfo `json:"continent"`
Subdivisions AddressInfo `json:"subdivisions"`
Location struct {
Latitude float64 `json:"lat"`
Longitude float64 `json:"lon"`
}
}
type AddressInfo struct {
GeonameId int `json:"geoname_id"`
Code string `json:"code"`
Name struct {
Zh string `json:"zh-cn"`
En string `json:"en"`
} `json:"name"`
}
type PortInfo struct {
Port int `json:"port"`
Product string `json:"product"`
Hostname string `json:"hostname"`
Service string `json:"service"`
Title string `json:"title"`
Os string `json:"os"`
Version string `json:"version"`
Info string `json:"info"`
Device string `json:"device"`
Extrainfo string `json:"extrainfo"`
Rdns string `json:"rdns"`
Banner string `json:"banner"`
}