Jump to content

A string with "hex(null character)" returns nothing?


Glyph
 Share

Recommended Posts

$datar0="00184d80c9ac00c0f06a4bbb08004500"
$datar1="00303b66400080063c16c0a8010204e5"
$datar2="bcbc0a450d3d1f1b34a1000000007002"
$datar3="ffff94950000020405b401010402"
MsgBox(0,"",_hextostring($datar0)&_hextostring($datar1)&_hextostring($datar2)&_hextostring($datar3))

Would return nothing...

I have tried the strings by themselves, and 00 seems to return nothing... after testing to see if it would work anyway, I got this error:

C:\Documents and Settings\New AutoIt v3 Script (8).au3 (80) : ==> "long_ptr", "int_ptr" and "short_ptr" DllCall() types have been deprecated.  Use "long*", "int*" and "short*" instead.: 
Local $aRet = DLLCall("Ws2_32.dll","int","getpeername","int",$SHOCKET, "ptr",DLLStructGetPtr($sockaddr),"int_ptr",DLLStructGetSize($sockaddr))

I can't think of what i would replace as a null character, just use nothing? That doesn't seem like it would be right though... anyone know anything about this?

Heres the packet sniffed:

0000   00 18 4d 80 c9 ac 00 c0 f0 6a 4b bb 08 00 45 00  ..M......jK...E.
0010   00 30 3b 66 40 00 80 06 3c 16 c0 a8 01 02 04 e5  .0;f@...<.......
0020   bc bc 0a 45 0d 3d 1f 1b 34 a1 00 00 00 00 70 02  ...E.=..4.....p.
0030   ff ff 94 95 00 00 02 04 05 b4 01 01 04 02        ..............

It simply won't return anything like that...

Thanks.

Edited by BackStabbed

tolle indicium

Link to comment
Share on other sites

A null string written into a message box or string would return nothing. In C++ and most other C based languages a null charater is treated like a break. Nothing after a null char is read.

for example do this

$datar3="ffff94950000020405b401010402"

$hex1 = _HexToString($datar3)
MsgBox(0,'',$hex1)

It will return the first 4 charters, but once it hits the null character it will stop.

replace 00 with 20. space or whitespace.

Edited by Kerros

Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...