Merge pull request #151 from 0dayCTF/search

Search functionality added, needs cleanup.
This commit is contained in:
Ryan Montgomery 2023-12-01 12:27:48 -05:00 committed by GitHub
commit f64539ffbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 50 additions and 2 deletions

View File

@ -165,3 +165,10 @@ button {
.shadow { .shadow {
margin-bottom: 0px !important; margin-bottom: 0px !important;
} }
.middle-card {
min-height: 500px;
max-height: 100%;
overflow-y: auto;
padding: 1.5rem;
}

View File

@ -215,3 +215,10 @@ a[href*="t3l3machus"] {
/* Fixes a minor style bug of the "Download Listener" button */ /* Fixes a minor style bug of the "Download Listener" button */
background: none; background: none;
} }
.middle-card {
min-height: 500px;
max-height: 100%;
overflow-y: auto;
padding: 1.5rem;
}

View File

@ -358,3 +358,10 @@ a[href*="t3l3machus"] {
/* Fixes a minor style bug of the Download Listener button */ /* Fixes a minor style bug of the Download Listener button */
background: none; background: none;
} }
.middle-card {
min-height: 500px;
max-height: 100%;
overflow-y: auto;
padding: 1.5rem;
}

View File

@ -218,7 +218,13 @@
<img src="assets/floppy-disk-solid.svg" class="download-svg" data-toggle="tooltip" title="Download Payload"> <img src="assets/floppy-disk-solid.svg" class="download-svg" data-toggle="tooltip" title="Download Payload">
</div> </div>
<!-- /Show all advanced switch --> <!-- /Show all advanced switch -->
<!-- Search Box -->
<div class="row">
<div class="col-md-6">
<input type="text" id="searchBox" placeholder="Search..." class="form-control mb-3">
</div>
</div>
<!-- /Search Box -->
<!---Filter OS--> <!---Filter OS-->
<div class="row"> <div class="row">
<label for="os-options" class="col-auto col-form-label float-left" <label for="os-options" class="col-auto col-form-label float-left"
@ -246,7 +252,8 @@
</div> </div>
<!-- Right column --> <!-- Right column -->
<div class="col-12 col-md-9 d-flex flex-column"> <div class="col-12 col-md-9 d-flex flex-column middle-card">
<!-- Reverse Shell Command --> <!-- Reverse Shell Command -->
<div class="row flex-grow-1"> <div class="row flex-grow-1">

View File

@ -536,3 +536,23 @@ $(function () {
// TODO: add a random fifo for netcat mkfifo // TODO: add a random fifo for netcat mkfifo
//let randomId = Math.random().toString(36).substring(2, 4); //let randomId = Math.random().toString(36).substring(2, 4);
// Search functionality
document.getElementById('searchBox').addEventListener('keyup', function() {
var searchTerm = this.value.toLowerCase();
var listItems = document.querySelectorAll('#reverse-shell-selection .list-group-item');
var count = 0;
listItems.forEach(function(item) {
var text = item.textContent.toLowerCase();
var match = text.indexOf(searchTerm) !== -1;
if (match) {
item.style.display = '';
count++;
} else {
item.style.display = 'none';
}
});
document.getElementById('noResults').style.display = count === 0 ? '' : 'none';
});