Sign in to follow this  
Followers 0
huyit

Format responseBody in win.httprequest like AMF

7 posts in this topic

How can i format the responseBody in win.httprequest like AMF response in charles .

Example

00000000 00 00 00 00 00 01 00 0b 2f 31 2f 6f 6e 52 65 73 /1/onRes

00000010 75 6c 74 00 04 6e 75 6c 6c 00 00 01 c8 03 00 04 ult null

00000020 72 65 71 73 0a 00 00 00 01 03 00 0a 66 72 69 65 reqs frie

00000030 6e 64 69 6e 66 6f 0a 00 00 00 03 03 00 03 75 69 ndinfo ui

00000040 64 00 41 77 8f aa 70 00 00 00 00 01 6e 02 00 07 d Aw p n

00000050 20 4e 6f 6e 61 6d 65 00 03 75 72 6c 02 00 40 68 Noname url @h

00000060 74 74 70 3a 2f 2f 61 76 61 74 61 72 2e 6d 65 2e ttp://avatar.me.

00000070 7a 64 6e 2e 76 6e 2f 61 76 61 74 61 72 5f 66 69 zdn.vn/avatar_fi

00000080 6c 65 73 2f 35 2f 35 2f 33 2f 63 2f 62 75 66 6f les/5/5/3/c/bufo

00000090 5f 62 75 66 6f 5f 35 30 5f 32 32 2e 6a 70 67 00 _bufo_50_22.jpg

000000a0 02 6e 6e 02 00 07 20 4e 6f 6e 61 6d 65 00 02 6c nn Noname l

000000b0 76 00 41 10 7d a8 00 00 00 00 00 00 09 03 00 03 v A }

000000c0 75 69 64 00 41 7a f6 6e e0 00 00 00 00 01 6e 02 uid Az n n

000000d0 00 09 51 75 61 6e 20 54 68 61 74 00 03 75 72 6c Quan That url

000000e0 02 00 41 68 74 74 70 3a 2f 2f 61 76 61 74 61 72 Ahttp://avatar

000000f0 2e 6d 65 2e 7a 64 6e 2e 76 6e 2f 61 76 61 74 61 .me.zdn.vn/avata

00000100 72 5f 66 69 6c 65 73 2f 31 2f 31 2f 64 2f 34 2f r_files/1/1/d/4/

00000110 71 75 61 6e 74 68 61 74 6e 6f 31 5f 35 30 5f 31 quanthatno1_50_1

00000120 2e 6a 70 67 00 02 6e 6e 02 00 09 51 75 61 6e 20 .jpg nn Quan

00000130 54 68 61 74 00 02 6c 76 00 40 bc c2 00 00 00 00 That lv @

00000140 00 00 00 09 03 00 03 75 69 64 00 41 77 b4 ea 00 uid Aw

00000150 00 00 00 00 01 6e 02 00 0d 6e 67 75 79 65 6e 20 n nguyen

00000160 6b 69 6d 20 61 6e 00 03 75 72 6c 02 00 3f 68 74 kim an url ?ht

00000170 74 70 3a 2f 2f 61 76 61 74 61 72 2e 6d 65 2e 7a tp://avatar.me.z

00000180 64 6e 2e 76 6e 2f 61 76 61 74 61 72 5f 66 69 6c dn.vn/avatar_fil

00000190 65 73 2f 64 2f 33 2f 31 2f 37 2f 7a 6b 61 6e 70 es/d/3/1/7/zkanp

000001a0 72 6f 39 78 5f 35 30 5f 31 2e 6a 70 67 00 02 6e ro9x_50_1.jpg n

000001b0 6e 02 00 0d 6e 67 75 79 65 6e 20 6b 69 6d 20 61 n nguyen kim a

000001c0 6e 00 02 6c 76 00 40 bc 44 00 00 00 00 00 00 00 n lv @ D

000001d0 09 00 03 65 72 72 00 00 00 00 00 00 00 00 00 00 err

000001e0 00 09 00 00 09

Posted Image

Become the data like

Posted Image

Share this post


Link to post
Share on other sites



Isn't this the same as


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Like this:

ConsoleWrite(_ToHexASCIIAddr(FileRead(@ScriptFullPath)))

Func _ToHexASCIIAddr($vInput)

    Local $bInput = Binary($vInput)
    Local $tInput = DllStructCreate("byte[" & BinaryLen($bInput) & "]")
    DllStructSetData($tInput, 1, $bInput)

    Local $aCall = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _
            "ptr", DllStructGetPtr($tInput), _
            "dword", DllStructGetSize($tInput), _
            "dword", 11, _ ; CRYPT_STRING_HEXASCIIADDR
            "ptr", 0, _
            "dword*", 0)

    If @error Or Not $aCall[0] Then Return SetError(1, 0, "")
    
    Local $iSize = $aCall[5]
    Local $tOut = DllStructCreate("char[" & $iSize & "]")

    $aCall = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _
            "ptr", DllStructGetPtr($tInput), _
            "dword", DllStructGetSize($tInput), _
            "dword", 11, _
            "ptr", DllStructGetPtr($tOut), _
            "dword*", $iSize)
    If @error Or Not $aCall[0] Then Return SetError(2, 0, "")

    Return DllStructGetData($tOut, 1)
EndFunc
Edited by trancexx

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Like this:

ConsoleWrite(_ToHexASCIIAddr(FileRead(@ScriptFullPath)))

Func _ToHexASCIIAddr($vInput)

    Local $bInput = Binary($vInput)
    Local $tInput = DllStructCreate("byte[" & BinaryLen($bInput) & "]")
    DllStructSetData($tInput, 1, $bInput)

    Local $aCall = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _
            "ptr", DllStructGetPtr($tInput), _
            "dword", DllStructGetSize($tInput), _
            "dword", 11, _ ; CRYPT_STRING_HEXASCIIADDR
            "ptr", 0, _
            "dword*", 0)

    If @error Or Not $aCall[0] Then Return SetError(1, 0, "")
    
    Local $iSize = $aCall[5]
    Local $tOut = DllStructCreate("char[" & $iSize & "]")

    $aCall = DllCall("Crypt32.dll", "int", "CryptBinaryToString", _
            "ptr", DllStructGetPtr($tInput), _
            "dword", DllStructGetSize($tInput), _
            "dword", 11, _
            "ptr", DllStructGetPtr($tOut), _
            "dword*", $iSize)
    If @error Or Not $aCall[0] Then Return SetError(2, 0, "")

    Return DllStructGetData($tOut, 1)
EndFunc

Thanks for your help .

But it does not what i want .

I want convert the hex data

00000030 6e 64 69 6e 66 6f 0a 00 00 01 f4 03 00 03 75 69 ndinfo ui

00000040 64 00 41 07 47 90 00 00 00 00 00 01 6e 02 00 16 d A G n

00000050 48 6f c3 a0 6e 67 20 6c c3 aa 20 6c e1 ba a1 63 Ho ng l l c

00000060 20 6b 68 61 6e 67 00 03 75 72 6c 02 00 41 68 74 khang url Aht

00000070 74 70 3a 2f 2f 61 76 61 74 61 72 2e 6d 65 2e 7a tp://avatar.me.z

00000080 64 6e 2e 76 6e 2f 61 76 61 74 61 72 5f 66 69 6c dn.vn/avatar_fil

00000090 65 73 2f 37 2f 63 2f 64 2f 35 2f 72 69 6e 31 32 es/7/c/d/5/rin12

000000a0 33 31 30 30 33 5f 35 30 5f 31 35 2e 6a 70 67 00 31003_50_15.jpg

000000b0 02 6e 6e 02 00 16 48 6f c3 a0 6e 67 20 6c c3 aa nn Ho ng l

000000c0 20 6c e1 ba a1 63 20 6b 68 61 6e 67 00 02 6c 76 l c khang lv

000000d0 00 40 db 90 00 00 00 00 00 00 00 09 03 00 03 75 @ u

to

uid Number 190706

n String Hoàng lê lạc khang

url String http://avatar.me.zdn.vn/avatar_files/7/ ... _50_15.jpg

nn String Hoàng lê lạc khang

lv Number 28224

Is it possible?

Share this post


Link to post
Share on other sites

Of course it's possible. It's just the other way around.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Of course it's possible. It's just the other way around.

Can you show me the other way ? Thanks

Share this post


Link to post
Share on other sites

Haiz , can anyone help me this problem ?

Share this post


Link to post
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
Sign in to follow this  
Followers 0