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

Function build_page

web_server/public/javascripts/data.js:30–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30function build_page() {
31 document.getElementById("censysSection").style.display = "none";
32 document.getElementById("scanSection").style.display = "none";
33
34 /* Zone Statistics */
35 get_counts("/api/v1.0/zones/stats", "activeZones");
36 get_counts("/api/v1.0/zones/stats?status=expired", "expiredZones");
37 get_counts("/api/v1.0/zones/stats?status=false_positive", "fpZones");
38 get_counts("/api/v1.0/zones/ip_stats", "ipZones");
39 get_counts("/api/v1.0/zones/ipv6_stats", "ipv6Zones");
40 get_counts("/api/v1.0//whois_db?count=1", "whoisRecords")
41 get_distinct_fields("/api/v1.0/zones/sources", "zoneSources");
42
43 /* DNS Statistics */
44 get_counts("/api/v1.0/sonar/rdns?count=1", "rdnsStatistics",);
45 get_counts("/api/v1.0/dns?count=1", "dnsStatistics");
46 get_counts("/api/v1.0/dead_dns?count=1", "deadDnsStatistics");
47 get_distinct_fields("/api/v1.0/dns/sources", "dnsSources");
48
49 /* CT Statistics */
50 get_counts("/api/v1.0/ct/total_count", "ctStatistics");
51 get_counts("/api/v1.0/ct/signature_algorithm?count=1", "sha1Statistics");
52 get_counts("/api/v1.0/ct/corp_certs?exclude_expired=1&count=1", "corpStatistics");
53 get_counts("/api/v1.0/ct/corp_certs?count=1", "corpExpStatistics");
54
55 for (let org in TLSOrgs) {
56 make_get_request("/api/v1.0/ct/org?org=" + encodeURIComponent(TLSOrgs[org]) + "&count=1", show_distinct_fields, [TLSOrgs[org], "trackedOrgs"], "errorMessage");
57 }
58
59 /* Censys Statistics */
60 if (ScanDataSources.includes("censys")) {
61 document.getElementById("censysSection").style.display = "block";
62 get_counts("/api/v1.0/censys/corp_ssl_count", "CensysCorpSSLCount");
63 get_counts("/api/v1.0/censys/protocol_count?protocol=ssl_2", "SSL2Count");
64 get_counts("/api/v1.0/censys/protocol_count?protocol=ssl_3", "SSL3Count");
65 get_counts("/api/v1.0/censys/protocol_count?protocol=tls", "TLSCount");
66 get_counts("/api/v1.0/censys/protocol_count?protocol=dhe", "SSLDHECount");
67 get_counts("/api/v1.0/censys/protocol_count?protocol=dhe_export", "SSLDHEExportCount");
68 get_counts("/api/v1.0/censys/protocol_count?protocol=rsa_export", "SSLRSAExportCount");
69 get_counts("/api/v1.0/censys/total_count", "censysCount");
70
71 for (let org in TLSOrgs) {
72 make_get_request("/api/v1.0/censys/certs?org=" + encodeURIComponent(TLSOrgs[org]) + "&count=1", show_distinct_fields, [TLSOrgs[org], "censysOrgs"], "errorMessage")
73 }
74
75 for (let i = 0; i < CensysSupportedPorts.length; i++) {
76 make_get_request("/api/v1.0/censys/ports?port=" + CensysSupportedPorts[i] + "&type=count", show_distinct_fields, [CensysSupportedPorts[i], "censysPorts"], "errorMessage");
77 }
78 }
79
80 /* Scan Statistics */
81 if (ScanDataSources.includes("zgrab")) {
82 document.getElementById("scanSection").style.display = "block";
83 get_counts("/api/v1.0/zgrab/80/ips?count=1", "zgrab80IP");
84 get_counts("/api/v1.0/zgrab/80/domains?count=1", "zgrab80Domain");
85 get_counts("/api/v1.0/zgrab/counts?collection=zgrab80", "zgrab80Total");
86 get_counts("/api/v1.0/zgrab/443/ips?count=1", "zgrab443IP");
87 get_counts("/api/v1.0/zgrab/443/domains?count=1", "zgrab443Domain");

Callers 1

custom_checkFunction · 0.70

Calls 3

get_distinct_fieldsFunction · 0.85
make_get_requestFunction · 0.85
get_countsFunction · 0.70

Tested by

no test coverage detected