Last active
September 5, 2016 09:42
-
-
Save daniel0x00/62322c0ac375ad6bfe04af5154acf67e to your computer and use it in GitHub Desktop.
JavaScript converter from string to Chr(x) ASCII codes in VBA
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
var to_chr = "powershell.exe"; | |
var return_string = ""; | |
var chars_max_return = 60; | |
for (var x=0, len=to_chr.length; x<len; x++) { | |
return_string += 'Chr('+to_chr[x].charCodeAt(0)+') & '; | |
if ((x > 0) && ((x % chars_max_return) == 0)) { console.log(return_string.substr(0,return_string.length - 3)); return_string = ""; } | |
} | |
console.log(return_string.substr(0,return_string.length - 3)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment