Update Analyze-HuntSMBShares.ps1

Updated graph toolbar.
This commit is contained in:
Scott Sutherland 2024-09-18 10:40:01 -05:00 committed by GitHub
parent e808bab108
commit e5b111dcff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,7 @@
#--------------------------------------
# Author: Scott Sutherland, 2024 NetSPI
# License: 3-clause BSD
# Version: v1.92
# Version: v1.93
# References: This script includes custom code and code taken and modified from the open source projects PowerView, Invoke-Ping, and Invoke-Parrell.
function Analyze-HuntSMBShares
{
@ -6461,11 +6461,16 @@ Folder groups are SMB shares that contain the exact same file listing. Each fold
</div>
<!-- SHAREGRAPH CONTAINER START -->
<div style="width: 100%; display: flex;">
<div style="width: 100%; height: 800px; position: relative; display: flex;">
<!-- SHAREGRAPH TOOLBAR -->
<div style="width: 179px; border: .5px solid lightgray; border-radius: 6px; padding: 10px; background-color: lightgray; margin-top: -10px;">
<div id="sharegraphToolbar" style="width: 179px; border: .5px solid lightgray; border-radius: 6px; padding: 10px; background-color: lightgray; position: absolute; height: 530px; transition: height 0.5s ease; z-index: 10; overflow: hidden;">
<!-- Hide Toolbar Button -->
<button id="toggleButton2" class="modern-button" style="margin-bottom: 5px; width: 176px;" onclick="toggleToolbar()">Hide Toolbar</button>
<!-- Content to hide when collapsed -->
<div id="toolbarContent">
<!-- Search and shortest path -->
<input type="text" id="search-input" placeholder="Search nodes..." class="modern-input" style="width: 180px;">
<input type="text" id="src-node" placeholder="src-node..." class="modern-input" style="width: 180px;">
@ -6473,6 +6478,7 @@ Folder groups are SMB shares that contain the exact same file listing. Each fold
<button id="find-path" class="modern-button" style="width: 176px;">Find Path</button>
<br>
<!-- Configuration Options -->
<!-- Configuration Options -->
<select id="layout-select" class="modern-dropdown" style="width: 180px;">
<option value="breadthfirst">Layout</option>
@ -6516,12 +6522,49 @@ Folder groups are SMB shares that contain the exact same file listing. Each fold
<button id="zoom-out" class="modern-button" style="font-size: 11px">Zoom Out&nbsp;</button>
</div>
</div>
</div>
<!-- Cytoscape Canvas -->
<div id="cy" style="flex: 3; height: 600px; margin-top: 10px;">
</div>
<div id="cy" style=" z-index: 1;flex-grow: 1; height: 100%; background-color: #f0f3f5; position: relative;">
<!-- Your graph content here -->
</div>
</div>
<!-- JavaScript to toggle the toolbar -->
<script>
function toggleToolbar() {
var toolbar = document.getElementById("sharegraphToolbar");
var button = document.getElementById("toggleButton2");
var content = document.getElementById("toolbarContent");
if (toolbar.style.height === "530px" || toolbar.style.height === "") {
// Collapse the toolbar to 40px
toolbar.style.height = "40px";
toolbar.style.transition = "height 0.5s ease";
// Hide the content
content.style.display = "none";
// Update button text
button.innerText = "Show Toolbar";
} else {
// Expand the toolbar back to its original height
toolbar.style.height = "530px";
toolbar.style.transition = "height 0.5s ease";
// Show the content
setTimeout(function() {
content.style.display = "block";
}, 500); // Delay to sync with height transition
// Update button text
button.innerText = "Hide Toolbar";
}
}
</script>
</div>
<!-- Hidden Menu - right-click -->
<label href="#" class="dropbtn" id="tbrearrange" onClick="">
<div id="nodemenu" class="dropdown-content">
@ -6551,7 +6594,7 @@ Folder groups are SMB shares that contain the exact same file listing. Each fold
<p id="popup-content">Content goes here...</p>
<button id="close-popup" class="modern-button">Close</button>
</div>
</div>
<script>
// Custom Organic Layout