Showing posts with label encoding. Show all posts
Showing posts with label encoding. Show all posts

Saturday, April 28, 2012

Convert binary Shell code to Javascript percentage encoding


<html>
<head>
<script language="JavaScript" type="text/javascript">
function ConvertShellCode(strdata)
{
    var s = new String(strdata);
    s = s.replace(/[\s\\x]/g, '');
    var strcode = '';

    for(var idx=0; idx<s.length; idx+=4)
        strcode += "%u" + s.substr(idx+2,2) + s.substr(idx+0,2);

    document.forms.ShellToJavascript.decode.value = strcode;
}
</script>
</head>
<body>
<form name="ShellToJavascript" method="post">
<textarea rows="10" cols="100" name="encode"></textarea><br />
<textarea rows="10" cols="100" name="decode"></textarea><br />
<input type="button" value="Encode" onclick="return ConvertShellCode(document.ShellToJavascript.encode.value)" />
</form>
</body>
</html>

http://www.governmentsecurity.org/forum/topic/27916-shell-code-convertorencoder/

Wednesday, October 20, 2010

uuencode

uuencode uudecode

Ubuntu: sudo apt-get install uuencode
Centos: yum install sharutils

Copy past need to include begin and end\n keyword


e.g. ( this article has an uuencoding file brazil_SMM.tgz )
http://www.phrack.com/issues.html?issue=65&id=7#article


A uuencoded file starts with a header line of the form:
 begin <mode> <file><newline>


e.g.,

begin 644 cat.txt
#0V%T
`
end


wiki explains uuencoding:
http://en.wikipedia.org/wiki/Uuencoding