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

Function queries

web_server/public/javascripts/cert_search.js:170–196  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

168}
169
170function queries(event) {
171 var sha_hash = document.getElementById("search_input").value.trim().toLowerCase();
172 document.getElementById("sn_search_input").value = "";
173
174 if (sha_hash.length === 40) {
175 get_counts("/api/v1.0/ct/fingerprint/" + sha_hash + "?count=1", "certTransparency");
176 if (ScanDataSources.includes("censys")) {
177 get_counts("/api/v1.0/censys/certs?count=1&fingerprint_sha1=" + sha_hash, "censysRecords");
178 }
179 if (ScanDataSources.includes("zgrab")) {
180 get_counts("/api/v1.0/zgrab/443/certs?count=1&fingerprint_sha1=" + sha_hash, "zscanRecords");
181 }
182 } else {
183 get_counts("/api/v1.0/ct/fingerprint/" + sha_hash + "?count=1", "certTransparency");
184 if (ScanDataSources.includes("censys")) {
185 get_counts("/api/v1.0/censys/certs?count=1&fingerprint_sha256=" + sha_hash, "censysRecords");
186 }
187 if (ScanDataSources.includes("zgrab")) {
188 get_counts("/api/v1.0/zgrab/443/certs?count=1&fingerprint_sha256=" + sha_hash, "zscanRecords");
189 }
190 }
191
192 if (event) {
193 event.preventDefault();
194 }
195 return false;
196}
197
198function sn_queries(event) {
199 var serial_number = document.getElementById("sn_search_input").value.trim().toLowerCase();

Callers 1

buildPageFunction · 0.70

Calls 1

get_countsFunction · 0.70

Tested by

no test coverage detected