This file contains hidden or 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
#!/bin/bash | |
set -e | |
askrun() { | |
read -p "Run '$1' (y/n): " answer | |
answer=$(echo "$answer" | tr '[:upper:]' '[:lower:]') | |
if [ "$answer" = "y" ]; then | |
echo "Running..." |
This file contains hidden or 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
#!/bin/bash | |
# git clone https://gist.github.com/2caf44eafe6067be85e7a564f80da988.git && cd 2caf44eafe6067be85e7a564f80da988 && sudo chmod +x helix.sh && ./helix.sh && cd .. | |
set -e | |
wget https://github.com/helix-editor/helix/releases/download/25.07.1/helix-25.07.1-x86_64-linux.tar.xz | |
tar -Jxvf helix-*-x86_64-linux.tar.xz | |
cd helix-*-x86_64-linux | |
sudo cp hx /usr/local/bin/ |
This file contains hidden or 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
sudo apt update | |
sudo apt install curl -y | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
sh get-docker.sh |
This file contains hidden or 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
#!/bin/bash | |
unifi_device_username="ubnt" | |
unifi_device_password="ubnt" | |
hosts_file="hosts.txt" | |
nmap_results_file="nmap-results.txt" | |
target_folder="logs" | |
if [ -f "$hosts_file" ]; then |
This file contains hidden or 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
$ErrorActionPreference = "Stop" | |
function Log { | |
param ( | |
$m | |
) | |
Write-Output "$("[{0:yyyy/MM/dd} {0:HH:mm:ss}]" -f (Get-Date)) $m" | |
} | |
$exportFolder = "D:\VM Exports" |
This file contains hidden or 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
$FIELD_ALLOW_DENY = 0 | |
$FIELD_PERM_1 = 1 | |
$FIELD_PERM_2 = 2 | |
$FIELD_UNK_1 = 3 | |
$FEIDL_UNK_2 = 4 | |
$FIELD_SID = 5 | |
$PERM_ALLOW_PRINT = "A;;SWRC" | |
$PERM_DENY_PRINT = "D;;SWRC" |
This file contains hidden or 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
Function Start-Cleanup { | |
<# | |
.SYNOPSIS | |
Automate cleaning up a C:\ drive with low disk space | |
.DESCRIPTION | |
Cleans the C: drive's Window Temperary files, | |
the local users Temperary folder, IIS logs(if applicable) and empties the recycling bin. | |
All deleted files will go into a log transcript in $env:TEMP. By default this |
This file contains hidden or 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
# Scans all user profile directories recursively for Compressed or Encrypted files or folders | |
$Directory = "C:\Users\" | |
$users = Get-ChildItem -Directory -Path $Directory | |
$total = $users.Count | |
$i = 0 | |
ForEach ($user in $users) { |
This file contains hidden or 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
$DOMAIN = "" | |
$USERS_PATH = "C:\Users" | |
$SUBINACL_PATH = "C:\Windows\system32\subinacl.exe" | |
function Remove-UserPermissions { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory = $true)] | |
[string]$FolderPath, |
This file contains hidden or 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
<# | |
.SYNOPSIS | |
Logs out inactive users. | |
.DESCRIPTION | |
Note: This script was forked and modified to also count "Active" but idle users as inactive. | |
Logs out inactive users, except for specific users that | |
have been manually approved and are allowed to stay logged | |
in for indefinite periods of time. |
NewerOlder