|
You last visited: Today at 10:40
Advertisement
[AutoIT] Sending Packets Help
Discussion on [AutoIT] Sending Packets Help within the SRO Coding Corner forum part of the Silkroad Online category.
08/04/2011, 15:52
|
#1
|
elite*gold: 0
Join Date: Aug 2009
Posts: 218
Received Thanks: 171
|
[AutoIT] Sending Packets Help
With edxloader i got this :
(Sit - Stand recorded)
Now, in AutoIt, i think that it need to look like this, but i dont know what to
write in "?????" to send packet for sit - stand command .
Code:
$Data = ??????
$IP = "127.0.0.1"
TCPStartUp()
$socket = TCPConnect( $IP, 16000)
If $socket = -1 Then MsgBox (0,"TCP","Can't make a connection")
TCPSend($socket,$Data)
Thanks in advance
|
|
|
08/04/2011, 16:21
|
#2
|
elite*gold: 0
Join Date: Dec 2007
Posts: 3,210
Received Thanks: 6,289
|
Quote:
Originally Posted by DeXeee
With edxloader i got this :
(Sit - Stand recorded)
Now, in AutoIt, i think that it need to look like this, but i dont know what to
write in "?????" to send packet for sit - stand command .
Code:
$Data = ??????
$IP = "127.0.0.1"
TCPStartUp()
$socket = TCPConnect( $IP, 16000)
If $socket = -1 Then MsgBox (0,"TCP","Can't make a connection")
TCPSend($socket,$Data)
Thanks in advance
|
Code:
Local $sPacket
AppendOpCode(0x704F)
AppendSecurity(2)
AppendByte(4)
$sPacket = GetPacketInjector($sBuffer)
TCPSend($Socket, $sPacket)
Use the injection functions from pushedx's autoit clientless.
|
|
|
08/04/2011, 16:37
|
#3
|
elite*gold: 0
Join Date: Aug 2009
Posts: 218
Received Thanks: 171
|
ZeraPain gave me this :
Code:
#include <string.au3>
Global $sBuffer, $rBuffer
Global $iSize, $iIndex
NewPacket(0x7074, 2)
AppendByte(1)
AppendByte(4)
AppendDWord(1300)
AppendByte(0)
MsgBox(0,0,GetPacket())
#region PacketWriter
Func NewPacket($sValue, $iValue)
Local $sTemp = Hex($sValue)
$sBuffer = ""
$iSize = 0
$sBuffer &= StringLeft(ReverseHex(Hex($sValue)), 4)
$sBuffer &= StringLeft(ReverseHex(Hex($iValue)), 4)
EndFunc ;==>NewPacket
Func AppendByte($sValue)
$sBuffer &= StringRight(Hex($sValue), 2)
$iSize += 1
EndFunc ;==>AppendByte
Func AppendWord($sValue)
$sBuffer &= StringLeft(ReverseHex(Hex($sValue)), 4)
$iSize += 2
EndFunc ;==>AppendWord
Func AppendDWord($sValue)
$sBuffer &= StringLeft(ReverseHex(Hex($sValue)), 8)
$iSize += 4
EndFunc ;==>AppendDWord
Func AppendString($sString, $Unicode = false)
Local $iLength = StringLen($sString)
If $Unicode Then
$sBuffer &= _StringToHexExt($sString, True)
$iSize += $iLength * 4
Else
$sBuffer &= _StringToHexExt($sString)
$iSize += $iLength * 2
EndIf
EndFunc ;==>AppendString
Func GetPacket()
Local $sTemp = "0x"
$sTemp &= StringLeft(ReverseHex(Hex($iSize)), 4)
$sTemp &= $sBuffer
Return $sTemp
EndFunc ;==>GetPacket
#endregion
#region PacketReader
Func BeginParse($sString)
$iIndex = 1
$rBuffer = StringMid($sString, 13)
Return Dec(StringMid($sString, 3, 2) & StringMid($sString, 1, 2))
EndFunc ;==>BeginParse
Func ReadByte()
Local $result = Dec(StringMid($rBuffer, $iIndex, 2))
$iIndex += 2
Return $result
EndFunc ;==>ReadByte
Func ReadWord()
Local $result = Dec(ReverseHex(StringMid($rBuffer, $iIndex, 4)))
$iIndex += 4
Return $result
EndFunc ;==>ReadWord
Func ReadDWord()
Local $result = Dec(ReverseHex(StringMid($rBuffer, $iIndex, 8)))
$iIndex += 8
Return $result
EndFunc ;==>ReadDWord
Func ReadString($iLength, $Unicode = False)
Local $result, $string = ""
If $Unicode Then
For $i = 0 To $iLength - 1
$string &= StringMid($rBuffer, $iIndex + $i * 4, 2)
Next
$iIndex += $iLength * 4
Else
$string = StringMid($rBuffer, $iIndex, $iLength * 2)
$iIndex += $iLength * 2
EndIf
$result = _HexToString($string)
Return $result
EndFunc ;==>ReadString
#endregion
Func ReverseHex($sString)
Local $sTemp, $len
For $i = StringLen($sString) + 1 To 1 Step -2
$sTemp &= StringMid($sString, $i, 2)
Next
Return $sTemp
EndFunc ;==>ReverseHex
Func _StringToHexExt($sString, $Unicode = False)
Local $string
If $Unicode Then
For $i = 1 To StringLen($sString)
$string &= _StringToHex(StringMid($sString, $i, 1)) & "00"
Next
Else
For $i = 1 To StringLen($sString)
$string &= _StringToHex(StringMid($sString, $i, 1))
Next
EndIf
Return $string
EndFunc ;==>_StringToHexExt
But i dont know what to input at :
Code:
NewPacket( ??? , 2)
AppendByte(?)
AppendByte(?)
AppendDWord( ???)
AppendByte(?)
MsgBox(0,0,GetPacket())
|
|
|
08/04/2011, 16:52
|
#4
|
elite*gold: 0
Join Date: Sep 2010
Posts: 783
Received Thanks: 920
|
Quote:
Originally Posted by DeXeee
ZeraPain gave me this :
Code:
#include <string.au3>
Global $sBuffer, $rBuffer
Global $iSize, $iIndex
NewPacket(0x7074, 2)
AppendByte(1)
AppendByte(4)
AppendDWord(1300)
AppendByte(0)
MsgBox(0,0,GetPacket())
#region PacketWriter
Func NewPacket($sValue, $iValue)
Local $sTemp = Hex($sValue)
$sBuffer = ""
$iSize = 0
$sBuffer &= StringLeft(ReverseHex(Hex($sValue)), 4)
$sBuffer &= StringLeft(ReverseHex(Hex($iValue)), 4)
EndFunc ;==>NewPacket
Func AppendByte($sValue)
$sBuffer &= StringRight(Hex($sValue), 2)
$iSize += 1
EndFunc ;==>AppendByte
Func AppendWord($sValue)
$sBuffer &= StringLeft(ReverseHex(Hex($sValue)), 4)
$iSize += 2
EndFunc ;==>AppendWord
Func AppendDWord($sValue)
$sBuffer &= StringLeft(ReverseHex(Hex($sValue)), 8)
$iSize += 4
EndFunc ;==>AppendDWord
Func AppendString($sString, $Unicode = false)
Local $iLength = StringLen($sString)
If $Unicode Then
$sBuffer &= _StringToHexExt($sString, True)
$iSize += $iLength * 4
Else
$sBuffer &= _StringToHexExt($sString)
$iSize += $iLength * 2
EndIf
EndFunc ;==>AppendString
Func GetPacket()
Local $sTemp = "0x"
$sTemp &= StringLeft(ReverseHex(Hex($iSize)), 4)
$sTemp &= $sBuffer
Return $sTemp
EndFunc ;==>GetPacket
#endregion
#region PacketReader
Func BeginParse($sString)
$iIndex = 1
$rBuffer = StringMid($sString, 13)
Return Dec(StringMid($sString, 3, 2) & StringMid($sString, 1, 2))
EndFunc ;==>BeginParse
Func ReadByte()
Local $result = Dec(StringMid($rBuffer, $iIndex, 2))
$iIndex += 2
Return $result
EndFunc ;==>ReadByte
Func ReadWord()
Local $result = Dec(ReverseHex(StringMid($rBuffer, $iIndex, 4)))
$iIndex += 4
Return $result
EndFunc ;==>ReadWord
Func ReadDWord()
Local $result = Dec(ReverseHex(StringMid($rBuffer, $iIndex, 8)))
$iIndex += 8
Return $result
EndFunc ;==>ReadDWord
Func ReadString($iLength, $Unicode = False)
Local $result, $string = ""
If $Unicode Then
For $i = 0 To $iLength - 1
$string &= StringMid($rBuffer, $iIndex + $i * 4, 2)
Next
$iIndex += $iLength * 4
Else
$string = StringMid($rBuffer, $iIndex, $iLength * 2)
$iIndex += $iLength * 2
EndIf
$result = _HexToString($string)
Return $result
EndFunc ;==>ReadString
#endregion
Func ReverseHex($sString)
Local $sTemp, $len
For $i = StringLen($sString) + 1 To 1 Step -2
$sTemp &= StringMid($sString, $i, 2)
Next
Return $sTemp
EndFunc ;==>ReverseHex
Func _StringToHexExt($sString, $Unicode = False)
Local $string
If $Unicode Then
For $i = 1 To StringLen($sString)
$string &= _StringToHex(StringMid($sString, $i, 1)) & "00"
Next
Else
For $i = 1 To StringLen($sString)
$string &= _StringToHex(StringMid($sString, $i, 1))
Next
EndIf
Return $string
EndFunc ;==>_StringToHexExt
But i dont know what to input at :
Code:
NewPacket( ??? , 2)
AppendByte(?)
AppendByte(?)
AppendDWord( ???)
AppendByte(?)
MsgBox(0,0,GetPacket())
|
If you want to send sit down packet :
NewPacket(0x704F,2) ; dunno what is iValue
AppendByte(4)
TCPSend($socket,GetPacket())
|
|
|
08/04/2011, 17:02
|
#5
|
elite*gold: 0
Join Date: Aug 2009
Posts: 218
Received Thanks: 171
|
Ok, i try it like this but i got dc ...
Code:
#include <string.au3>
Global $sBuffer, $rBuffer
Global $iSize, $iIndex
$IP = "127.0.0.1"
TCPStartUp()
$socket = TCPConnect( $IP, 16000)
If $socket = -1 Then MsgBox (0,"TCP","Can't make a connection")
NewPacket(0x704F,2)
AppendByte(4)
TCPSend($socket,GetPacket())
Func NewPacket($sValue, $iValue)
Local $sTemp = Hex($sValue)
$sBuffer = ""
$iSize = 0
$sBuffer &= StringLeft(ReverseHex(Hex($sValue)), 4)
$sBuffer &= StringLeft(ReverseHex(Hex($iValue)), 4)
EndFunc ;==>NewPacket
Func ReverseHex($sString)
Local $sTemp, $len
For $i = StringLen($sString) + 1 To 1 Step -2
$sTemp &= StringMid($sString, $i, 2)
Next
Return $sTemp
EndFunc ;==>ReverseHex
Func AppendByte($sValue)
$sBuffer &= StringRight(Hex($sValue), 2)
$iSize += 1
EndFunc ;==>AppendByte
Func GetPacket()
Local $sTemp = "0x"
$sTemp &= StringLeft(ReverseHex(Hex($iSize)), 4)
$sTemp &= $sBuffer
Return $sTemp
EndFunc ;==>GetPacket
Is there anything wrong ?
|
|
|
08/04/2011, 17:43
|
#6
|
elite*gold: 0
Join Date: Sep 2010
Posts: 783
Received Thanks: 920
|
Quote:
Originally Posted by DeXeee
Ok, i try it like this but i got dc ...
Code:
#include <string.au3>
Global $sBuffer, $rBuffer
Global $iSize, $iIndex
$IP = "127.0.0.1"
TCPStartUp()
$socket = TCPConnect( $IP, 16000)
If $socket = -1 Then MsgBox (0,"TCP","Can't make a connection")
NewPacket(0x704F,2)
AppendByte(4)
TCPSend($socket,GetPacket())
Func NewPacket($sValue, $iValue)
Local $sTemp = Hex($sValue)
$sBuffer = ""
$iSize = 0
$sBuffer &= StringLeft(ReverseHex(Hex($sValue)), 4)
$sBuffer &= StringLeft(ReverseHex(Hex($iValue)), 4)
EndFunc ;==>NewPacket
Func ReverseHex($sString)
Local $sTemp, $len
For $i = StringLen($sString) + 1 To 1 Step -2
$sTemp &= StringMid($sString, $i, 2)
Next
Return $sTemp
EndFunc ;==>ReverseHex
Func AppendByte($sValue)
$sBuffer &= StringRight(Hex($sValue), 2)
$iSize += 1
EndFunc ;==>AppendByte
Func GetPacket()
Local $sTemp = "0x"
$sTemp &= StringLeft(ReverseHex(Hex($iSize)), 4)
$sTemp &= $sBuffer
Return $sTemp
EndFunc ;==>GetPacket
Is there anything wrong ?
|
Hmm maybe this iValue is the security byte
try
NewPacket(0x704F,1)
AppendByte(4)
TCPSend($socket,GetPacket())
|
|
|
08/04/2011, 17:50
|
#7
|
elite*gold: 0
Join Date: Aug 2009
Posts: 218
Received Thanks: 171
|
Quote:
Originally Posted by ÑõÑ_Ŝŧóp
Hmm maybe this iValue is the security byte
try
NewPacket(0x704F,1)
AppendByte(4)
TCPSend($socket,GetPacket())
|
Dc again =/
I try to add
Code:
TCPCloseSocket($socket)
TCPShutdown()
at the end, but its not helping
Maybe is the problem becouse i am using HackShield, iBot and edx loader to start up Silkroad ?
----------------------------------------------------
Maybe i am not sending packets to SRO, maybe to ibot ha ?
I am using iBot
Then with edxloader i am redirecting Getway server to : 127.0.0.1 Port : 16000 ( Like in iBot )
In AutoIT i am using the same
Code:
$IP = "127.0.0.1"
TCPStartUp()
$socket = TCPConnect( $IP, 16000)
Maybe is that the problem, ha ? =/
|
|
|
08/04/2011, 21:24
|
#8
|
elite*gold: 0
Join Date: Jan 2010
Posts: 360
Received Thanks: 249
|
it always depends on the proxy you use.
i used srproxy.
iValue are the security bytes.
(for srproxy 0100 = P->C , 0200 P->S)
try to use it with srproxy w/o revbot compability (should be connected to port 9000)
|
|
|
08/04/2011, 21:54
|
#9
|
elite*gold: 0
Join Date: Aug 2009
Posts: 218
Received Thanks: 171
|
Thanks a lot mates !
Synx7
ÑõÑ_Ŝŧóp
ZeraPain
I'll try everything you told me, i will tell you tomorow did i make it to work
GUUUUUYSSSSSSSS I LOVE YOU SOOOOOOOO MUUUUUCHH !!!!
I MAKE A SIT XDDD OH YEA BEYBEEE !
I will post codes tomorow and make a little tutorial
Again thanks a lot , with regards, Dex !
|
|
|
08/04/2011, 22:49
|
#10
|
elite*gold: 0
Join Date: Dec 2007
Posts: 3,210
Received Thanks: 6,289
|
Glad you got it working =3
|
|
|
08/04/2011, 22:56
|
#11
|
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,654
|
Quote:
Originally Posted by DeXeee
Thanks a lot mates !
Synx7
ÑõÑ_Ŝŧóp
ZeraPain
I'll try everything you told me, i will tell you tomorow did i make it to work
GUUUUUYSSSSSSSS I LOVE YOU SOOOOOOOO MUUUUUCHH !!!!
I MAKE A SIT XDDD OH YEA BEYBEEE !
I will post codes tomorow and make a little tutorial
Again thanks a lot , with regards, Dex !
|
its the greatest pleasure you would ever have in packet injection thingy. have fun
|
|
|
08/04/2011, 23:02
|
#12
|
elite*gold: 0
Join Date: Aug 2009
Posts: 218
Received Thanks: 171
|
Just 1 more question guys ...
I got this from analayzer :
Code:
[C -> S][7074]
01
04
14 05 00 00
00
Now, in AutoIT i dont know how to convert this "14 05 00 00" :
Code:
AppendOpCode2(0x7074)
AppendSecurity2(2)
AppendByte2(1)
AppendByte2(4)
AppendWord2(????)
AppendByte2(0)
Can some1 tell me how to calculate that, or what ever i need to do with this
|
|
|
08/04/2011, 23:07
|
#13
|
elite*gold: 0
Join Date: Jan 2010
Posts: 360
Received Thanks: 249
|
MsgBox(0,0, Dec(ReverseHex("14050000")))
-> 1300 -> your value
|
|
|
08/04/2011, 23:24
|
#14
|
elite*gold: 0
Join Date: Dec 2007
Posts: 3,210
Received Thanks: 6,289
|
This tool is really helpful for that. Remember byte's max value its 255.
|
|
|
08/04/2011, 23:57
|
#15
|
elite*gold: 0
Join Date: Aug 2009
Posts: 218
Received Thanks: 171
|
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 ?
|
|
|
|
|
Similar Threads
|
Sending Packets
03/26/2019 - PW Hacks, Bots, Cheats, Exploits - 432 Replies
As per Smurfin's request:
reposting of what I posted in the Prophet's bot thread.
some example of functions you could use with sending packets (AutoIt code, see link below for C#):
;////Code for sending packets.
|
Help with sending packets in autoit
08/16/2010 - AutoIt - 1 Replies
ive been lookin around different sites for ways to send packets to the game server. the only examples i see is to create a server and a client which i dont need, i think. well to the point now, can someone lead me in a direction or tell me how to send packets to a game? also if i send packets then that means i dont need the game to be active, correct? Because in autoit when u use keys u need to have the game active, and control send does not work. ty
|
Sending Packets !!!
09/07/2008 - Kal Online - 14 Replies
now i know how to sniff / analyse packets ... but what then ? :)
how can i send packets ?? to pimp or mix weapon for example
i just need the way to send , and then i can depend on myself :D
|
Scamming by sending packets???
04/15/2006 - Conquer Online 2 - 1 Replies
Well my friend and i came up with the idea to send packets to the server to show a certain item in the trade window. We want to use this as a type of scam. I didnt see this in any other threads and was wondering if anyone knew if this is possible and if they could point use in the right direction. My friend was pretty good with packets in CO 1.0 but we arent really sure to go about doing it. If anyone one could please lend a helping hand?
P.S.- Before I get flamed for this because i know i...
|
Sending packets
10/12/2005 - Conquer Online 2 - 10 Replies
I've a question. Is it possible to send 1 packet multiple times at the exact same time?
|
All times are GMT +2. The time now is 10:40.
|
|