Created
December 5, 2017 21:22
-
-
Save IISResetMe/cba955fc01b84fff4396dada77e36102 to your computer and use it in GitHub Desktop.
CthulhuShell
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
function π { | |
$name,$params = $args.Where({$_ -eq 'π©'},'Until') | |
$null,$body = $args.Where({$_ -eq 'π©'},'SkipUntil') | |
$params = @($params |? {$_}) | |
$func = @" | |
param($(($params |% {"`${$_}"})-join',')) | |
$(($params |% {$body = $body -replace "($([regex]::Escape($_)))",'(&$${$1})'})) | |
$body | |
"@ | |
"function global:$name {$func}" |Invoke-Expression | |
} | |
π 1οΈβ£ π© 1 | |
π 2οΈβ£ π© 2 | |
π β π °οΈ π ±οΈ π© π °οΈ+π ±οΈ | |
β 1οΈβ£ 2οΈβ£ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment