diff --git a/cache/crtsh/raptor_cc24_dev.json b/cache/crtsh/raptor_cc24_dev.json new file mode 100644 index 0000000..0374a8f --- /dev/null +++ b/cache/crtsh/raptor_cc24_dev.json @@ -0,0 +1 @@ +{"domain":"raptor.cc24.dev","first_cached":"2025-09-14T21:48:36.125466+00:00","last_upstream_query":"2025-09-14T21:48:36.125473+00:00","upstream_query_count":1,"certificates":[{"issuer_ca_id":295809,"issuer_name":"C=US, O=Let's Encrypt, CN=E8","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":20932466299,"entry_timestamp":"2025-09-11T00:00:34.317","not_before":"2025-09-10T23:02:04","not_after":"2025-12-09T23:02:03","serial_number":"06caca488600654bc3cbb9640842c17a33c9","result_count":2},{"issuer_ca_id":295809,"issuer_name":"C=US, O=Let's Encrypt, CN=E8","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":20932466581,"entry_timestamp":"2025-09-11T00:00:34.161","not_before":"2025-09-10T23:02:04","not_after":"2025-12-09T23:02:03","serial_number":"06caca488600654bc3cbb9640842c17a33c9","result_count":2},{"issuer_ca_id":295809,"issuer_name":"C=US, O=Let's Encrypt, CN=E8","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":20774957253,"entry_timestamp":"2025-09-04T00:01:21.738","not_before":"2025-09-03T23:02:51","not_after":"2025-12-02T23:02:50","serial_number":"069e14f2a0c50f099415131d4d9998e06cce","result_count":2},{"issuer_ca_id":295809,"issuer_name":"C=US, O=Let's Encrypt, CN=E8","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":20774357080,"entry_timestamp":"2025-09-04T00:01:21.569","not_before":"2025-09-03T23:02:51","not_after":"2025-12-02T23:02:50","serial_number":"069e14f2a0c50f099415131d4d9998e06cce","result_count":2},{"issuer_ca_id":295813,"issuer_name":"C=US, O=Let's Encrypt, CN=E7","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":20641602307,"entry_timestamp":"2025-08-29T00:01:48.126","not_before":"2025-08-28T23:03:17","not_after":"2025-11-26T23:03:16","serial_number":"050c7f4c1de13cf075d166239a81a782366e","result_count":2},{"issuer_ca_id":295813,"issuer_name":"C=US, O=Let's Encrypt, CN=E7","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":20641602356,"entry_timestamp":"2025-08-29T00:01:47.769","not_before":"2025-08-28T23:03:17","not_after":"2025-11-26T23:03:16","serial_number":"050c7f4c1de13cf075d166239a81a782366e","result_count":2},{"issuer_ca_id":295809,"issuer_name":"C=US, O=Let's Encrypt, CN=E8","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":20514294514,"entry_timestamp":"2025-08-23T00:00:45.148","not_before":"2025-08-22T23:02:14","not_after":"2025-11-20T23:02:13","serial_number":"056e8fb88c4a72319c4aefc88cc5031e4a7f","result_count":2},{"issuer_ca_id":295809,"issuer_name":"C=US, O=Let's Encrypt, CN=E8","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":20512724524,"entry_timestamp":"2025-08-23T00:00:45.028","not_before":"2025-08-22T23:02:14","not_after":"2025-11-20T23:02:13","serial_number":"056e8fb88c4a72319c4aefc88cc5031e4a7f","result_count":2},{"issuer_ca_id":295810,"issuer_name":"C=US, O=Let's Encrypt, CN=E5","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":20381330496,"entry_timestamp":"2025-08-17T00:01:25.43","not_before":"2025-08-16T23:02:55","not_after":"2025-11-14T23:02:54","serial_number":"05ec6969e5cc0c3f689768ff9c4645b3d6c5","result_count":2},{"issuer_ca_id":295810,"issuer_name":"C=US, O=Let's Encrypt, CN=E5","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":20381330264,"entry_timestamp":"2025-08-17T00:01:25.234","not_before":"2025-08-16T23:02:55","not_after":"2025-11-14T23:02:54","serial_number":"05ec6969e5cc0c3f689768ff9c4645b3d6c5","result_count":2},{"issuer_ca_id":295819,"issuer_name":"C=US, O=Let's Encrypt, CN=E6","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":20254015250,"entry_timestamp":"2025-08-11T00:01:59.632","not_before":"2025-08-10T23:03:29","not_after":"2025-11-08T23:03:28","serial_number":"053213449ce82bf4433ea2796e1eed3a9419","result_count":2},{"issuer_ca_id":295819,"issuer_name":"C=US, O=Let's Encrypt, CN=E6","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":20254014799,"entry_timestamp":"2025-08-11T00:01:59.452","not_before":"2025-08-10T23:03:29","not_after":"2025-11-08T23:03:28","serial_number":"053213449ce82bf4433ea2796e1eed3a9419","result_count":2},{"issuer_ca_id":295819,"issuer_name":"C=US, O=Let's Encrypt, CN=E6","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":20121999143,"entry_timestamp":"2025-08-05T00:00:09.694","not_before":"2025-08-04T23:01:37","not_after":"2025-11-02T23:01:36","serial_number":"05e103c8031a63cd77d5ce2ccf6c43572872","result_count":2},{"issuer_ca_id":295819,"issuer_name":"C=US, O=Let's Encrypt, CN=E6","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":20121998287,"entry_timestamp":"2025-08-05T00:00:07.369","not_before":"2025-08-04T23:01:37","not_after":"2025-11-02T23:01:36","serial_number":"05e103c8031a63cd77d5ce2ccf6c43572872","result_count":2},{"issuer_ca_id":295810,"issuer_name":"C=US, O=Let's Encrypt, CN=E5","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":19995903614,"entry_timestamp":"2025-07-30T00:06:09.786","not_before":"2025-07-29T23:07:39","not_after":"2025-10-27T23:07:38","serial_number":"055943670b2c7f4b3d6c124fe93044e0fa7d","result_count":2},{"issuer_ca_id":295810,"issuer_name":"C=US, O=Let's Encrypt, CN=E5","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":19995903609,"entry_timestamp":"2025-07-30T00:06:09.472","not_before":"2025-07-29T23:07:39","not_after":"2025-10-27T23:07:38","serial_number":"055943670b2c7f4b3d6c124fe93044e0fa7d","result_count":2},{"issuer_ca_id":295819,"issuer_name":"C=US, O=Let's Encrypt, CN=E6","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":19865190665,"entry_timestamp":"2025-07-24T00:00:16.358","not_before":"2025-07-23T23:01:45","not_after":"2025-10-21T23:01:44","serial_number":"0593039edd8033a34a17401ce3c42b78265c","result_count":2},{"issuer_ca_id":295819,"issuer_name":"C=US, O=Let's Encrypt, CN=E6","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":19865190586,"entry_timestamp":"2025-07-24T00:00:15.458","not_before":"2025-07-23T23:01:45","not_after":"2025-10-21T23:01:44","serial_number":"0593039edd8033a34a17401ce3c42b78265c","result_count":2},{"issuer_ca_id":295810,"issuer_name":"C=US, O=Let's Encrypt, CN=E5","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":19743127457,"entry_timestamp":"2025-07-18T00:00:54.45","not_before":"2025-07-17T23:02:23","not_after":"2025-10-15T23:02:22","serial_number":"05334599854eb839217f492b1114fb0f2d4a","result_count":2},{"issuer_ca_id":295810,"issuer_name":"C=US, O=Let's Encrypt, CN=E5","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":19743129110,"entry_timestamp":"2025-07-18T00:00:54.176","not_before":"2025-07-17T23:02:23","not_after":"2025-10-15T23:02:22","serial_number":"05334599854eb839217f492b1114fb0f2d4a","result_count":2},{"issuer_ca_id":295819,"issuer_name":"C=US, O=Let's Encrypt, CN=E6","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":19601084334,"entry_timestamp":"2025-07-11T21:34:30.618","not_before":"2025-07-11T20:36:00","not_after":"2025-10-09T20:35:59","serial_number":"06695b4ebe19a305a7ff3eed6a2a9b0b441e","result_count":2},{"issuer_ca_id":295819,"issuer_name":"C=US, O=Let's Encrypt, CN=E6","common_name":"raptor.cc24.dev","name_value":"raptor.cc24.dev","id":19601084566,"entry_timestamp":"2025-07-11T21:34:30.369","not_before":"2025-07-11T20:36:00","not_after":"2025-10-09T20:35:59","serial_number":"06695b4ebe19a305a7ff3eed6a2a9b0b441e","result_count":2}]} \ No newline at end of file diff --git a/static/css/main.css b/static/css/main.css index 440e78e..0084f89 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -328,41 +328,6 @@ input[type="text"]:focus, select:focus { min-height: 500px; } -.view-controls { - display: flex; - gap: 1.5rem; - align-items: center; -} - -.filter-group { - display: flex; - align-items: center; - gap: 0.5rem; -} - -.filter-group label { - font-size: 0.9rem; - color: #999; -} - -.filter-group select, -.filter-group input[type="range"] { - background-color: #1a1a1a; - border: 1px solid #555; - color: #c7c7c7; - padding: 0.25rem 0.5rem; -} - -.filter-group select { - max-width: 150px; -} - -#confidence-value { - min-width: 30px; - text-align: center; - color: #00ff41; -} - .graph-container { height: 800px; position: relative; @@ -397,6 +362,79 @@ input[type="text"]:focus, select:focus { background: rgba(42, 42, 42, 1); } +.graph-filter-panel { + position: absolute; + bottom: 10px; + left: 10px; + z-index: 10; + background: rgba(42, 42, 42, 0.9); + border: 1px solid #555; + color: #c7c7c7; + padding: 0.75rem; + font-family: 'Roboto Mono', monospace; + font-size: 0.8rem; + max-height: 40%; + overflow-y: auto; + display: flex; + gap: 1.5rem; +} + +.filter-column { + display: flex; + flex-direction: column; +} + +.filter-column h4 { + color: #00ff41; + margin-bottom: 0.5rem; + font-size: 0.9rem; + border-bottom: 1px solid #444; + padding-bottom: 0.25rem; +} + +.filter-column .checkbox-group { + display: flex; + flex-direction: column; + gap: 0.25rem; +} + +.filter-column label { + display: flex; + align-items: center; + gap: 0.5rem; + cursor: pointer; + transition: color 0.2s; +} + +.filter-column label:hover { + color: #00ff41; +} + +.filter-column input[type="checkbox"] { + appearance: none; + width: 12px; + height: 12px; + border: 1px solid #555; + background-color: #1a1a1a; + cursor: pointer; + position: relative; +} + +.filter-column input[type="checkbox"]:checked { + background-color: #00ff41; + border-color: #00ff41; +} + +.filter-column input[type="checkbox"]:checked::after { + content: '✓'; + position: absolute; + top: -3px; + left: 1px; + color: #1a1a1a; + font-size: 12px; +} + + .graph-context-menu { position: absolute; z-index: 1000; diff --git a/static/js/graph.js b/static/js/graph.js index c6462b9..ae6d10f 100644 --- a/static/js/graph.js +++ b/static/js/graph.js @@ -14,6 +14,7 @@ class GraphManager { this.nodeInfoPopup = null; this.contextMenu = null; this.history = []; + this.filterPanel = null; this.options = { nodes: { @@ -177,6 +178,8 @@ class GraphManager { // Add graph controls this.addGraphControls(); + this.addFilterPanel(); + console.log('Graph initialized successfully'); } catch (error) { @@ -208,6 +211,12 @@ class GraphManager { document.getElementById('graph-unhide').addEventListener('click', () => this.unhideAll()); document.getElementById('graph-revert').addEventListener('click', () => this.revertLastAction()); } + + addFilterPanel() { + this.filterPanel = document.createElement('div'); + this.filterPanel.className = 'graph-filter-panel'; + this.container.appendChild(this.filterPanel); + } /** * Setup network event handlers @@ -354,6 +363,10 @@ class GraphManager { this.nodes.update(processedNodes); this.edges.update(processedEdges); + this.updateFilterControls(); + this.applyAllFilters(); + + // Highlight new additions briefly if (newNodes.length > 0 || newEdges.length > 0) { setTimeout(() => this.highlightNewElements(newNodes, newEdges), 100); @@ -921,49 +934,74 @@ class GraphManager { //isStabilized: this.network ? this.network.isStabilized() : false }; } + + updateFilterControls() { + if (!this.filterPanel) return; - /** - * Apply filters to the graph - * @param {string} nodeType - The type of node to show ('all' for no filter) - * @param {number} minConfidence - The minimum confidence score for edges to be visible - */ - applyFilters(nodeType, minConfidence) { - console.log(`Applying filters: nodeType=${nodeType}, minConfidence=${minConfidence}`); + const nodeTypes = new Set(this.nodes.get().map(n => n.type)); + const edgeTypes = new Set(this.edges.get().map(e => e.metadata.relationship_type)); + + let nodeCheckboxes = '

Nodes

'; + nodeTypes.forEach(type => { + const label = type === 'correlation_object' ? 'latent correlations' : type; + const isChecked = type !== 'correlation_object'; + nodeCheckboxes += ``; + }); + nodeCheckboxes += '
'; + + let edgeCheckboxes = '

Edges

'; + edgeTypes.forEach(type => { + edgeCheckboxes += ``; + }); + edgeCheckboxes += '
'; + + this.filterPanel.innerHTML = nodeCheckboxes + edgeCheckboxes; + + this.filterPanel.querySelectorAll('input[type="checkbox"]').forEach(checkbox => { + checkbox.addEventListener('change', () => this.applyAllFilters()); + }); + } + + applyAllFilters() { + const hiddenNodeTypes = new Set(); + this.filterPanel.querySelectorAll('input[data-filter-type="node"]:not(:checked)').forEach(cb => { + hiddenNodeTypes.add(cb.value); + }); + + const hiddenEdgeTypes = new Set(); + this.filterPanel.querySelectorAll('input[data-filter-type="edge"]:not(:checked)').forEach(cb => { + hiddenEdgeTypes.add(cb.value); + }); const nodeUpdates = []; const edgeUpdates = []; + const visibleEdges = new Set(); - const allNodes = this.nodes.get({ returnType: 'Object' }); - const allEdges = this.edges.get(); - - // Determine which nodes are visible based on the nodeType filter - for (const nodeId in allNodes) { - const node = allNodes[nodeId]; - const isVisible = (nodeType === 'all' || node.type === nodeType); - nodeUpdates.push({ id: nodeId, hidden: !isVisible }); - } - - // Update nodes first to determine edge visibility - this.nodes.update(nodeUpdates); - - // Determine which edges are visible based on confidence and connected nodes - for (const edge of allEdges) { - const sourceNode = this.nodes.get(edge.from); - const targetNode = this.nodes.get(edge.to); - const confidence = edge.metadata ? edge.metadata.confidence_score : 0; - - const isVisible = confidence >= minConfidence && - sourceNode && !sourceNode.hidden && - targetNode && !targetNode.hidden; - + this.edges.get().forEach(edge => { + const isVisible = !hiddenEdgeTypes.has(edge.metadata.relationship_type); edgeUpdates.push({ id: edge.id, hidden: !isVisible }); - } + if (isVisible) { + visibleEdges.add(edge.id); + } + }); + this.nodes.get().forEach(node => { + let isVisible = !hiddenNodeTypes.has(node.type); + if (isVisible) { + const connectedEdges = this.network.getConnectedEdges(node.id); + const hasVisibleConnection = connectedEdges.some(edgeId => visibleEdges.has(edgeId)); + if (!hasVisibleConnection && connectedEdges.length > 0) { + isVisible = false; + } + } + nodeUpdates.push({ id: node.id, hidden: !isVisible }); + }); + this.edges.update(edgeUpdates); - - console.log('Filters applied.'); + this.nodes.update(nodeUpdates); } - + + /** * Show context menu for a node * @param {string} nodeId - The ID of the node diff --git a/static/js/main.js b/static/js/main.js index a4d9b46..4bc70df 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -83,11 +83,6 @@ class DNSReconApp { // Other elements sessionId: document.getElementById('session-id'), connectionStatus: document.getElementById('connection-status'), - - // Filter elements - nodeTypeFilter: document.getElementById('node-type-filter'), - confidenceFilter: document.getElementById('confidence-filter'), - confidenceValue: document.getElementById('confidence-value') }; // Verify critical elements exist @@ -211,13 +206,6 @@ class DNSReconApp { } }); - // Filter events - this.elements.nodeTypeFilter.addEventListener('change', () => this.applyFilters()); - this.elements.confidenceFilter.addEventListener('input', () => { - this.elements.confidenceValue.textContent = this.elements.confidenceFilter.value; - this.applyFilters(); - }); - console.log('Event handlers set up successfully'); } catch (error) { @@ -1043,18 +1031,6 @@ class DNSReconApp { }); } - /** - * Apply graph filters - */ - applyFilters() { - if (this.graphManager) { - const nodeType = this.elements.nodeTypeFilter.value; - const minConfidence = parseFloat(this.elements.confidenceFilter.value); - this.graphManager.applyFilters(nodeType, minConfidence); - } - } - - /** * Check if graph data has changed * @param {Object} graphData - New graph data diff --git a/templates/index.html b/templates/index.html index 578c4d9..de5dd2f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -110,24 +110,6 @@

Infrastructure Map

-
-
- - -
-
- - - 0 -
-