A collection of useful powershell scripts.
Get-ADUser -Filter * | ForEach-Object { Set-ADAccountPassword -Identity $_.SamAccountName -NewPassword (Read-Host "Enter the new password" -AsSecureString) -Reset }
@echo off
| #!/bin/sh | |
| # Launch Quartus in docker on MacOS with XQuartz GUI passthrough. | |
| quartus () { | |
| defaults write org.xquartz.X11 enable_render_extension 0 # Fixes black background issue (ref: https://github.com/XQuartz/XQuartz/issues/31) | |
| open /Applications/Utilities/XQuartz.app # open quartz | |
| mkdir -p ~/Desktop/quartus/ | |
| sleep 3; # Wait for XQuartz to open. | |
| # launch quartus: | |
| DISPLAY=:0 xterm -e zsh -c 'del_stopped ghidra; xhost + 127.0.0.1; docker run --init -it --rm --name quartus --cpus 4 --memory 6g -e MAXMEM=6G -e DISPLAY=host.docker.internal:0 -v ~/Desktop/quartus:/build ghcr.io/raetro/quartus:21.1 /bin/bash -c "echo c2VkIC1pIC1lICdzX2dyZXAgc3NlIC9wcm9jL2NwdWluZm8gPiAvZGV2L251bGwgMj4mMV9lY2hvICJieXBhc3MgY3B1IGNoZWNrIl9nJyAvb3B0L2ludGVsRlBHQS9xdWFydHVzL2FkbS9xZW52LnNoICYmIHF1YXJ0dXM= | base64 -d | bash"; xhost - 127.0.0.1' | |
| echo "Exiting Quartus" | 
| #!/bin/sh | |
| # Launch Ghidra in docker on MacOS with XQuartz GUI passthrough. | |
| ghidra () { | |
| defaults write org.xquartz.X11 enable_render_extension 0 # Fixes black background issue (ref: https://github.com/XQuartz/XQuartz/issues/31) | |
| open /Applications/Utilities/XQuartz.app # open quartz | |
| mkdir -p ~/Desktop/ghidra/projects | |
| mkdir -p ~/Desktop/ghidra/samples | |
| sleep 3; # Wait for XQuartz to open. | |
| # launch ghidra: | |
| DISPLAY=:0 xterm -e zsh -c 'del_stopped ghidra; xhost + 127.0.0.1; docker run --init -it --rm --name ghidra --cpus 4 --memory 6g -e MAXMEM=6G -e DISPLAY=host.docker.internal:0 -v ~/Desktop/ghidra/samples:/samples -v ~/Desktop/ghidra/projects:/root blacktop/ghidra:10; xhost - 127.0.0.1' | 
| heat_template_version: 2013-05-23 | |
| description: >- | |
| Setup Kali with a public IP and a new relevant security group | |
| Source: https://gist.github.com/bman46/3179294e3d4d63c10550ef71ab8229bb | |
| parameters: | |
| passwd: | |
| type: string | |
| label: Root and User Password | 
| #!/bin/bash | |
| [ "$UID" -eq 0 ] || exec sudo bash "$0" "$@" | |
| echo "efw file mounter" | |
| read -e -p "Enter E01 file: " srcfile | |
| read -p "Enter dest name (just a name, not a path): " dstfolder | |
| UUIDMNT=/tmp/efw_$(uuidgen) | |
| mkdir -p $UUIDMNT |