mrpink
1
Hi,
I have a variable like:
test = 0x65 0x78
and I wanna have this converted or outputet to-----> ex
which is the ascii code of 0x65 (=e) and 0x78 (=x) . But how can I do
this ?
test = 0x65 doesn’t, test = “0x65” doesn’t test = String(0x65) also
doesn’t…
can someone please help me with this?
greets
mrpink
2
On 4/13/07, mrpink [email protected] wrote:
test = 0x65 doesn’t, test = “0x65” doesn’t test = String(0x65) also
doesn’t…
If you have this in an array, you can use Array#pack
eg.
a = [0x65, 0x78].
a.pack(“U*”)
This will work for multibyte unicode strings as well.
Hth.
–
अà¤à¤¿à¤œà¥€à¤¤
[written in http://www.paahijen.com/scratchpad]
[http://www.paahijen.com]
mrpink
3
On 13.04.2007 17:47, mrpink wrote:
Hi,
I have a variable like:
test = 0x65 0x78
What exactly is this supposed to mean? This is not valid Ruby:
$ ruby -ce ‘test = 0x65 0x78’
-e:1: parse error, unexpected tINTEGER, expecting $
and I wanna have this converted or outputet to-----> ex
which is the ascii code of 0x65 (=e) and 0x78 (=x) . But how can I do
this ?
test = 0x65 doesn’t, test = “0x65” doesn’t test = String(0x65) also
doesn’t…
can someone please help me with this?
Very likely, if we know what your input is.
robert
mrpink
4
yeah this was wrong varibale too… but I got it out:
shellcode = “\x65\x61”
puts(shellcode)
does what I needed 