MCPcopy Create free account
hub / github.com/code-scan/Goal / GetHistory

Method GetHistory

Gsensor/SecurityTrailsSensor.go:145–165  ·  view source on GitHub ↗

历史记录查询

()

Source from the content-addressed store, hash-verified

143
144// 历史记录查询
145func (s *SecurityTrails) GetHistory() {
146 s.result = Result{}
147 uri := "https://securitytrails.com/app/api/v1/history/" + s.Domain + "/dns/a"
148 uri = fmt.Sprintf("https://securitytrails.com/_next/data/%s/domain/%s/history/a.json?domain=%s&type=a", s.buildId, s.Domain, s.Domain)
149 resp, err := s.httpReq(uri)
150 if err != nil {
151 log.Println("[!] GetHistory 1 Error: ", err)
152 return
153 }
154 history := AHistoryRespsonse{}
155 err = json.Unmarshal(resp, &history)
156 if err != nil {
157 log.Println("[!] GetHistory 2 Error: ", err)
158 return
159 }
160 for _, r := range history.Pageprops.Dnsdata.Data.History.A.Data.Records {
161 for _, v := range r.Values {
162 s.result[v.IP] = "[" + r.Firstseen + "] -- [" + r.Lastseen + "]"
163 }
164 }
165}
166
167// ip查询
168func (s *SecurityTrails) GetIp(page int) {

Callers 1

GetResultMethod · 0.95

Calls 1

httpReqMethod · 0.95

Tested by

no test coverage detected