历史记录查询
()
| 143 | |
| 144 | // 历史记录查询 |
| 145 | func (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查询 |
| 168 | func (s *SecurityTrails) GetIp(page int) { |