()
| 40 | } |
| 41 | |
| 42 | function build_page() { |
| 43 | var path = window.location.pathname; |
| 44 | if (path === "/meta/zone_list") { |
| 45 | fetch_zone_list(null); |
| 46 | document.getElementById("zone_search").addEventListener("submit", fetch_zone_pattern); |
| 47 | } else if (path === "/meta/port_list") { |
| 48 | portSource = qs("portSource"); |
| 49 | if (ScanDataSources.includes("censys") && portSource === "censys") { |
| 50 | portSource = "censys"; |
| 51 | initialize_port_page(); |
| 52 | } else { |
| 53 | portSource = "zgrab"; |
| 54 | initialize_scan_port_page(); |
| 55 | } |
| 56 | get_srv_records(); |
| 57 | } else if (path === "/meta/ip_zone_list") { |
| 58 | fetch_ip_zone_list(); |
| 59 | } else if (path === "/meta/ipv6_zone_list") { |
| 60 | fetch_ipv6_zone_list(); |
| 61 | } else if (path === "/meta/tpd_list") { |
| 62 | initialize_tpd_list(); |
| 63 | } else if (path === "/meta/tpd_list_detail") { |
| 64 | var tpd = qs("tpd"); |
| 65 | if (!tpd) { |
| 66 | document.getElementById('errorMessage').innerHTML = "<b>A TPD value must be provided!</b>"; |
| 67 | return; |
| 68 | } |
| 69 | display_tpd_detail(tpd); |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | function display_zone_list(results) { |
| 74 | var display_list = '<div class="list-group" id="0">'; |
no test coverage detected