(event)
| 183 | } |
| 184 | |
| 185 | function queries(event) { |
| 186 | var range = document.getElementById("search_input").value; |
| 187 | var ipv4 = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$/; |
| 188 | |
| 189 | if (!(range.match(ipv4))) { |
| 190 | errorHandler("Invalid Range: " + range); |
| 191 | return; |
| 192 | } |
| 193 | |
| 194 | if (useCensys) { |
| 195 | get_counts("/api/v1.0/censys/ips?count=1&range=" + range, "censys"); |
| 196 | } |
| 197 | |
| 198 | for (let entry in divRefTable) { |
| 199 | if (entry === "sonar_rdns") { |
| 200 | make_get_request("/api/v1.0/sonar/rdns?count=1&range=" + range, displayCountData, "sonar_rdns"); |
| 201 | } else { |
| 202 | make_get_request("/api/v1.0/dns?count=1&source=" + entry + "&range=" + range, displayCountData, entry); |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | if (event) { |
| 207 | event.preventDefault(); |
| 208 | } |
| 209 | return false; |
| 210 | } |
no test coverage detected