-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
93 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
investigations/templates/investigations/network_artifacts/network_graph.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!-- Investigation network_scan artifacts --> | ||
<button class="btn btn-warn-d" type="button" data-bs-toggle="collapse" data-bs-target="#collapseNetGraph" aria-expanded="false" aria-controls="collapseNetscan"> | ||
Network Graph | ||
</button> | ||
<div class="collapse mt-5" id="collapseNetGraph"> | ||
<div id="net_graph" style="height:50rem;"></div> | ||
<script> | ||
anychart.onDocumentReady(function () { | ||
// create data | ||
var data = JSON.parse("{{network_graph|escapejs}}"); | ||
console.log(data); | ||
// create a data tree | ||
// create a chart and set the data | ||
var chart = anychart.graph(data); | ||
chart.background().fill("#293b58"); | ||
chart.nodes().labels().enabled(true); | ||
|
||
chart.nodes().labels().format("{%id}"); | ||
chart.nodes().labels().fontSize(12); | ||
chart.nodes().labels().fontWeight(600); | ||
// set the chart title | ||
chart.title("Network Communications"); | ||
// configure tooltips of nodes | ||
chart.nodes().tooltip().useHtml(true); | ||
chart.nodes().tooltip().format( | ||
"<span style='font-weight:bold'>Involved PIDs : {%Involved_PIDs}</span><br><span style='font-weight:bold'>Local Ports: {%Local_Ports}</span>" | ||
); | ||
// set the container id | ||
chart.container("net_graph"); | ||
|
||
// initiate drawing the chart | ||
chart.draw(); | ||
}); | ||
</script> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters