Update PowerHuntShares.psm1

Small menu style change.
This commit is contained in:
Scott Sutherland 2024-08-06 09:52:18 -05:00 committed by GitHub
parent 154611bffe
commit 91df97630a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@
#--------------------------------------
# Author: Scott Sutherland, 2024 NetSPI
# License: 3-clause BSD
# Version: v1.95
# Version: v1.96
# References: This script includes custom code and code taken and modified from the open source projects PowerView, Invoke-Ping, and Invoke-Parrell.
function Invoke-HuntSMBShares
{
@ -4613,19 +4613,19 @@ input[type="checkbox"]:checked::before {
<!--
|||||||||| SIDE MENU
-->
<div class="sidenav">
<div class="side-menu" id="sideMenu">
<div style="border-bottom:1px solid #F56A00;width: 80%;display: block;margin-left:20px">
<div style="font-size: 15;font-weight:bolder;color:white;margin-bottom:5px; margin-top:28px;" align="center">
<a href="https://github.com/NetSPI/PowerHuntShares" style="text-decoration: none; color:#F56A00;cursor: pointer;">POWERHUNT
SHARES</a>
</div>
<button onclick="toggleMenu()" class="menu-button" style="margin-top: -15px; margin-right: -10px;">
<span class="icon" style="font-size: 16;"></span>
</button>
<div style="font-weight:bolder;color:white;margin-bottom:5px; margin-top:14px; margin-left: 14px;" align="left">
<a href="https://github.com/NetSPI/PowerHuntShares" style="text-decoration: none; color:#F56A00;cursor: pointer;">
<br><SPAN style="font-size: 15;">POWERHUNT</SPAN><SPAN style="color:white;font-size: 15;">SHARES</span></a>
<br>
<SPAN style="font-size: 11;font-weight:normal;">$TargetDomain</SPAN>
</div>
<div style="width: 80%;display: block;margin-left:20px">
<div style="font-size: 15;font-weight:bolder;color:white;margin-bottom:10px; margin-top:10px;text-align:center;">$TargetDomain</div>
</div>
<div id="tabs" class="tabs" data-tabs-ignore-url="false">
<label class="tabLabel" style="width:100%;color:#07142A;background-color:#F56A00;border-top:1px solid white;padding-top:5px;padding-bottom:5px;margin-top:1px;margin-bottom:2px;font-weight:bolder"><Strong>Reports</Strong></label>
<label href="#" class="stuff" style="width:100%;" onClick="radiobtn = document.getElementById('dashboard');radiobtn.checked = true;">Dashboard</label>
@ -6157,6 +6157,21 @@ The left menu can be used to find summary data, the scan summary is in the table
</div>
<script>
// --------------------------
// side menu collapse function
// --------------------------
function toggleMenu() {
const menu = document.getElementById('sideMenu');
const icon = document.querySelector('.menu-button .icon');
menu.classList.toggle('collapsed');
if (menu.classList.contains('collapsed')) {
icon.textContent = '☰'; // Collapsed state icon (hamburger menu)
} else {
icon.textContent = '☰'; // Expanded state icon (hamburger menu)
}
}
// --------------------------
// Folder Group Page: Chart - Interesting Files
// --------------------------
@ -8394,6 +8409,89 @@ function Convert-DataTableToHtmlTable
<head>
<title>$Title</title>
<style>
.side-menu {
box-shadow: 0 2px 4px 0;
width: 180px;
height: 100%;
background-color:#07142A;
position: fixed; /* Stay in place */
top: 0;
left: 0;
float:left;
line-height:1.15;
-webkit-text-size-adjust:100%;
-ms-text-size-adjust:100%;
z-index: 1;
--transition: width 0.3s; /* Smooth transition when expanding/collapsing */
}
.side-menu.collapsed div,
.side-menu.collapsed h2,
.side-menu.collapsed ul,
.side-menu.collapsed ul li {
opacity: 0; /* Hide text and child divs when collapsed */
height: 0; /* Collapse height to prevent content from being visible */
overflow: hidden; /* Ensure that any overflow content is hidden */
transition: opacity 0.3s, height 0.3s; /* Smooth transition for hiding content */
}
.side-menu a {
width:auto;
cursor:initial;
border-bottom:2px solid transparent;
-webkit-box-ordinal-group:2;
-ms-flex-order:1;
order:1;
}
.side-menu.collapsed {
width: 50px; /* Width when collapsed */
}
.side-menu h2 {
text-align: center;
margin: 50px 0; /* Add margin for better spacing */
}
.side-menu ul {
list-style-type: none;
padding: 0;
transition: opacity 0.3s; /* Fade effect */
}
.side-menu ul li {
padding: 10px 0;
text-align: center;
}
.menu-button {
margin: 0;
padding: 10px;
font-size: 16px;
cursor: pointer;
background-color: transparent;
border: none;
color: white;
position: absolute;
right: 10px; /* Align to right when expanded */
top: 10px; /* Align to top when expanded */
--transition: all 0.3s; /* Smooth transition for position */
}
.menu-button .icon {
font-size: 24px;
}
.side-menu.collapsed h2,
.side-menu.collapsed ul li {
opacity: 0; /* Hide text when collapsed */
}
.side-menu.collapsed .menu-button {
right: 18px; /* Keep the icon aligned to the right */
top: 10px; /* Keep the icon aligned to the top */
}
{box-sizing:border-box}
body,html{