MCPcopy Create free account
hub / github.com/adobe/Marinus / queries

Function queries

web_server/public/javascripts/ip_range.js:185–210  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

183}
184
185function 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}

Callers 1

continueBuildPageFunction · 0.70

Calls 3

errorHandlerFunction · 0.85
make_get_requestFunction · 0.85
get_countsFunction · 0.70

Tested by

no test coverage detected