Created
September 3, 2017 14:39
-
-
Save cryptolok/8cab23efafa936c41b6131540737b710 to your computer and use it in GitHub Desktop.
PowerShell script Base64 encoder/obfuscator in BASH
This file contains 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 | |
# PowerShell script Base64 encoder/obfuscator in BASH | |
PS=$1 | |
if [[ -e "$PS" ]] | |
then | |
B64=$(iconv -t utf16le $PS | base64 | tr -d '\n') | |
# echo "powershell.exe -ExecutionPolicy ByPass -EncodedCommand $B64" | |
echo "PoWerSHelL -eNc $B64" | |
else | |
echo 'Usage : ps2b64 $PS_SCRIPT' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment