[AutoIT] Sending Packets Help

08/05/2011 00:00 ÑõÑ_Ŝŧóp#16
Quote:
Originally Posted by DeXeee View Post
Huh, buffs dont want to work ... :S

Code:
[C -> S][7074]
01                                      
04                                     
14 05 00 00                                 
00
I use this method to get "AppendWord2()" :

Code:
#include <string.au3>
Global $sBuffer, $rBuffer
Global $iSize, $iIndex

MsgBox(0,"",Dec(ReverseHex("14050000")))

Func ReverseHex($sString)
	Local $sTemp, $i
	For $i = StringLen($sString) +1 To 1 Step -2
		$sTemp &= StringMid($sString, $i, 2)
	Next
	Return $sTemp
EndFunc   ;==>ReverseHex
For 14050000 i got 1300 and put it in AppendWord2()


So, this is the final :

Code:
AppendOpCode2(0x7074)
AppendSecurity2(2)
AppendByte2(1)
AppendByte2(4)
AppendWord2(1300)
AppendByte2(0)
Was I wrong somewhere ? :confused:
well, you should put 1 instead of 2 in security
look : 0100 (1) = C->S
0200 (2) = S->C
0300 (3) = C->S (Encrypted)
0400 (4) = S->C (Encrypted)
08/05/2011 00:04 DeXeee#17
Quote:
Originally Posted by ÑõÑ_Ŝŧóp View Post
well, you should put 1 instead of 2 in security
look : 0100 (1) = C->S
0200 (2) = S->C
0300 (3) = C->S (Encrypted)
0400 (4) = S->C (Encrypted)
Its (2) for C -> S

and (1) for S -> C

I make it work , here is the code how it need to look like :

Code:
AppendOpCode2(0x7074)
	AppendSecurity2(2)
	AppendByte2(1)
	AppendByte2(4)
	AppendByte2(20)
	AppendByte2(5)
	AppendByte2(0)
	AppendByte2(0)
	AppendByte2(0)
08/05/2011 00:26 ÑõÑ_Ŝŧóp#18
Quote:
Originally Posted by DeXeee View Post
Its (2) for C -> S

and (1) for S -> C

I make it work , here is the code how it need to look like :

Code:
AppendOpCode2(0x7074)
	AppendSecurity2(2)
	AppendByte2(1)
	AppendByte2(4)
	AppendByte2(20)
	AppendByte2(5)
	AppendByte2(0)
	AppendByte2(0)
	AppendByte2(0)
hmm maybe
didn't work with sr proxy b4 :D!
in phConnector its like what i said
btw it shouldn't look like that


it should be :
AppendOpCode2(0x7074)
AppendSecurity2(2)
AppendByte2(1)
AppendByte2(4)
AppendDWord2(1300) ; dword not word
AppendByte2(0)
08/05/2011 00:35 Kape7#19
Try with:

AppendOpCode2(0x7074)
AppendSecurity2(2)
AppendByte2(1)
AppendByte2(4)
AppendByte2(13)
AppendByte2(0)
AppendByte2(0)
08/05/2011 00:56 DeXeee#20
Quote:
Originally Posted by Synx7 View Post
Try with:

AppendOpCode2(0x7074)
AppendSecurity2(2)
AppendByte2(1)
AppendByte2(4)
AppendByte2(13)
AppendByte2(0)
AppendByte2(0)
It's not working, only like this :

Code:
AppendOpCode2(0x7074)
	AppendSecurity2(2)
	AppendByte2(1)
	AppendByte2(4)
	AppendByte2(251)
	AppendByte2(4)
	AppendByte2(0)
	AppendByte2(0)
	AppendByte2(0)

Here is the next question :D

How to select a mob, becouse every mob have deferent id ( idk how to say it )

I find in iBot Data some informations and idk can i use it :

"8D070000","MOB_CH_MANGNYANG","Mangyang",54
08/05/2011 01:45 ÑõÑ_Ŝŧóp#21
Quote:
Originally Posted by DeXeee View Post
It's not working, only like this :

Code:
AppendOpCode2(0x7074)
	AppendSecurity2(2)
	AppendByte2(1)
	AppendByte2(4)
	AppendByte2(251)
	AppendByte2(4)
	AppendByte2(0)
	AppendByte2(0)
	AppendByte2(0)

Here is the next question :D

How to select a mob, becouse every mob have deferent id ( idk how to say it )

I find in iBot Data some informations and idk can i use it :

"8D070000","MOB_CH_MANGNYANG","Mangyang",54
well
to select mob
you need to parse group/single spawn to get the object ip which you'll use to select the mob.
and thats not easy.
group spawn opcode : 0x3019
single spawn : 0x3015
(esro)
dunno about isro atm ..
08/05/2011 03:09 ZeraPain#22
Quote:
Originally Posted by DeXeee View Post
Huh, buffs dont want to work ... :S

Code:
[C -> S][7074]
01                                      
04                                     
14 05 00 00                                 
00
I use this method to get "AppendWord2()" :

Code:
#include <string.au3>
Global $sBuffer, $rBuffer
Global $iSize, $iIndex

MsgBox(0,"",Dec(ReverseHex("14050000")))

Func ReverseHex($sString)
	Local $sTemp, $i
	For $i = StringLen($sString) +1 To 1 Step -2
		$sTemp &= StringMid($sString, $i, 2)
	Next
	Return $sTemp
EndFunc   ;==>ReverseHex
For 14050000 i got 1300 and put it in AppendWord2()


So, this is the final :

Code:
AppendOpCode2(0x7074)
AppendSecurity2(2)
AppendByte2(1)
AppendByte2(4)
AppendWord2(1300)
AppendByte2(0)
Was I wrong somewhere ? :confused:
14 05 00 00 is a DWord and not a Word
08/05/2011 03:41 sarkoplata#23
+ @zerapains post
byte (uint8) - 00
word (uint16) - 00 00
dword ( uint32 ) - 00 00 00 00
qword (uint64) im not sure also if its "q" - 00 00 00 00 00 00 00 00
@dexee
to select mobs, you should parse the spawn packets which server sends you and make list of them with their ids. And select one from list , ( calculating the x,y first )
08/05/2011 19:12 DeXeee#24
Quote:
Originally Posted by sarkoplata View Post
@dexee
to select mobs, you should parse the spawn packets which server sends you and make list of them with their ids. And select one from list , ( calculating the x,y first )
I cant make it to recive the packet ..

I was trying with TCPListen("127.0.0.1",15778)
and then :

Code:
$accept = TCPAccept($listen)
    If $accept = -1 Then
        ToolTip($accept & " Not Connected")
		Sleep(1000)
        Exit
    EndIf
Its always -1 :S
08/05/2011 19:18 kevin_owner#25
try TCPRecv or TCPReceive idk how it's called in autoit. You only connect to the proxy and the proxy sends all the packets C -> S and S -> C to your autoit program.
08/05/2011 19:49 DeXeee#26
Quote:
Originally Posted by kevin_owner View Post
try TCPRecv or TCPReceive idk how it's called in autoit. You only connect to the proxy and the proxy sends all the packets C -> S and S -> C to your autoit program.
I make it ...

But i am just receive something like thins :

Code:
0x180021B00200E8C0F00101A8600703C9FFE70001A8605B21CAEF5EC21707
What to do with this ? :D

I am sure that i need to convert to something, but idk how ..
08/05/2011 20:24 ZeraPain#27
it's your packet.
not necessary to convert anything, you have to interpret it now.
08/05/2011 21:20 DeXeee#28
Quote:
Originally Posted by ZeraPain View Post
it's your packet.
not necessary to convert anything, you have to interpret it now.
Yea, but i rly dont understand anything here

Is there any way to convert it to look like in edxloader analyzer ?
08/05/2011 21:29 kevin_owner#29
No there isn't you have to do that by yourself so you have to read the packet.
the first 6 bytes are always the same format which is:
WORD Size
WORD Opcode
BYTE Security01
BYTE Security02

Everything after this is the data well the Size which is the first 2 bytes tells you how long the actual data is. What you have to do now is to go ingame with edxSilkroadLoader and use the analyzer so you get parsed packets and implement those in your program.

This takes a lot of time cause there are a lot of bytes which are 0 and if they change to 1 there is some extra data but overall it's very time consuming and the spawn packets aren't easy to start with cause I assume you are a beginner at the whole packet thing.
08/05/2011 23:00 DeXeee#30
This is the code that i got with my programm and i compare it with edx analyzer :

Code:
0x3900153002008D070000 (#1)9AE70E00 A860CDA874442D0E1FC2CCF96F4480CC0101 (#3)A860 (#4)F803 (#5)F5FF (#6)4A03 (#7)01 00030000000000410000B0410000C842000201050004

Code:
[S -> C][B021]
#1  - 9A E7 0E 00                                 
#2  - 01                                         
#3  - A8 60                                        
#4  - F8 03                                        
#5  - F5 FF                                        
#6  - 4A 03                                      
#7  - 01                                    
#8  - A8 60                                  
#9  - 99 23                                    
#10 - C4 FA 37 C1                     
#11 - CA 2D
I cant find from #8 to #11, or i maybe do it wrong :S

And maybe i compare two different packets ... :confused: