Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save soulemike/408bec0813561635fb54f156b99df794 to your computer and use it in GitHub Desktop.
Save soulemike/408bec0813561635fb54f156b99df794 to your computer and use it in GitHub Desktop.
Convert inline HEX characters to ASCII
$s='wind\x6f\x77["\x64oc\x75\x6den\x74"\x5d\x2ec\x72\x65a\x74\x65E\x6cemen\x74'
($s|Select-String -Pattern "([.\\][.x].{2})" -AllMatches).Matches.Value|select -Unique|%{$s=$s.Replace([string]$_,[char]([convert]::ToInt16($_.Substring(2,2),16)))}
#window["document"].createElement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment