|
You last visited: Today at 03:48
Advertisement
[Autoit]using opcodes
Discussion on [Autoit]using opcodes within the SRO Coding Corner forum part of the Silkroad Online category.
03/06/2012, 12:54
|
#1
|
elite*gold: 0
Join Date: Jul 2008
Posts: 112
Received Thanks: 10
|
[Autoit]using opcodes
I don't know how to send packet like this I copied some codes from "acer2000" but i don't know how to convert packet like this
[C -> S][704F]
04
To binary like he did
btw sorry for bad English.
that's code
PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
local $edit
$g_IP = "127.0.0.1"
$stan = "0x704F04"
;$ss = "0x04004570010004020000" ;start talk
;$s1 = "0x0500467001000402000003" ; deposite
;$s2 = "0x070034700100020D0004020000" ; put item #1 at inventory to storage
TCPStartUp()
$socket = TCPConnect($g_IP, 16000)
$Form1 = GUICreate("Form1", 624, 449, 191, 114)
$Button1 = GUICtrlCreateButton("start", 208, 376, 193, 57)
$Button2 = GUICtrlCreateButton("Button2", 400, 328, 145, 49)
$edit = GUICtrlCreateEdit("", 10, 10, 280, 180)
#EndRegion ### END Koda GUI section ###
if $socket = -1 Then
MsgBox(0, "Ops", "Run proxy and program will close after 3 sec")
Sleep(3000)
else
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg(0)
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1
$recv = TCPRecv($socket , 8)
$binFirst = BinaryMid($recv, 1, 10)
If @error Then MsgBox(0, "Ops", "Run proxy and program will close after 3 sec")
If $recv <> "" Then GUICtrlSetData($edit, _
$g_IP & " > " & $binFirst & @CRLF & GUICtrlRead($edit))
case $Button2
TCPSend($socket,$stan)
;Sleep(2000)
;TCPSend($socket,$s1)
;Sleep(2000)
;TCPSend($socket,$s2)
EndSwitch
WEnd
EndIf
when i send it i got crash can anyone help me and thx
|
|
|
03/06/2012, 15:02
|
#2
|
elite*gold: 0
Join Date: Sep 2007
Posts: 255
Received Thanks: 531
|
You have to reverse byte order, and build the packet like:
Code:
"0100" = data length
"4F70" = opcode
"0100" = security, for nu/phConnector used to tell direction/encryption
"04" = packet data
So the sit packet would be "0x01004F70010004". To make life little easier, you should use functions like:
Code:
Func Rev($val)
$result = ""
For $i = 1 To StringLen($val) / 2
$byte = StringRight($val, 2)
$val = StringTrimRight($val, 2)
$result &= $byte
Next
Return $result
EndFunc
Func SendPacket($opcode, $data)
$opcode = Rev($opcode)
$size = Rev(Hex(StringLen($data)/2, 4))
TCPSend($socket, "0x" & $size & $opcode & "0100" & $data)
EndFunc
Usage: SendPacket("704F", "04")
|
|
|
03/06/2012, 18:40
|
#3
|
elite*gold: 0
Join Date: Aug 2011
Posts: 10
Received Thanks: 0
|
Thank you kondo for topic and jremy for the functions, helped me a lot.
But i cant connect i think...
i try phconnector with a default options:
HTML Code:
[phConnector]
IP=121.128.133.30
Port=15779
LoginListenPort=15778
WorldListenPort=15777
BotPort=22580
ServerBlock=
ClientBlock=
Dev=0
OK Connection of phconnector: OK
AutoIt i try:
HTML Code:
$socket = TCPConnect("127.0.0.1", 15779)
And to send:
HTML Code:
SendPacket("704F", "04")
with a function....Like jremy said...
But nothing happen
I will need use a pather for client or program for hackshield? ...
Waiting for anserws
|
|
|
03/06/2012, 23:03
|
#4
|
elite*gold: 0
Join Date: Jul 2008
Posts: 112
Received Thanks: 10
|
thx jremy
|
|
|
03/08/2012, 19:24
|
#5
|
elite*gold: 0
Join Date: May 2009
Posts: 31
Received Thanks: 11
|
@bothpro
If you want to use client, you have to redirect your client to "127.0.0.1", 15779
Then connect your program to bot port (BotPort=22580)
If you don't want to use client, that topic should help you:

Just use phConnector instead of edxsilkroadproxy
|
|
|
03/10/2012, 01:20
|
#6
|
elite*gold: 0
Join Date: Aug 2011
Posts: 10
Received Thanks: 0
|
Dont work for me :/
I tried use new and old version of phconnector ...
I tried use edxloader v5 or v6..and only config redirect..and patch seed...
I tried in a Vsro...
When i send a packet..my client get DC...
Im using a win 64 bits, have any problem using this?
Thanks waiting answers
|
|
|
03/10/2012, 23:15
|
#7
|
elite*gold: 0
Join Date: Jul 2008
Posts: 112
Received Thanks: 10
|
@jremy
when i send packet
Quote:
i got dc why !?!?
|
|
|
03/10/2012, 23:58
|
#8
|
elite*gold: 0
Join Date: May 2009
Posts: 31
Received Thanks: 11
|
The problem is in using Hex() function.
The proper functioning requires integer arguments.
When you divide a number, foating number was returned.
You have to convert it to integer like this:
Code:
Func SendPacket($opcode, $data)
$opcode = Rev($opcode)
$size = Rev(Hex(Int(StringLen($data)/2), 4))
TCPSend($socket, "0x" & $size & $opcode & "0100" & $data)
EndFunc
|
|
|
03/11/2012, 01:04
|
#9
|
elite*gold: 0
Join Date: Jul 2008
Posts: 112
Received Thanks: 10
|
Quote:
Originally Posted by srutownik
The problem is in using Hex() function.
The proper functioning requires integer arguments.
When you divide a number, foating number was returned.
You have to convert it to integer like this:
Code:
Func SendPacket($opcode, $data)
$opcode = Rev($opcode)
$size = Rev(Hex(Int(StringLen($data)/2), 4))
TCPSend($socket, "0x" & $size & $opcode & "0100" & $data)
EndFunc
|
it's work thx
|
|
|
03/11/2012, 01:31
|
#10
|
elite*gold: 0
Join Date: Aug 2011
Posts: 10
Received Thanks: 0
|
Yes itīs work !!!! Thanks!!!
|
|
|
 |
Similar Threads
|
[VB.NET]Use OPCODES
04/06/2012 - SRO Coding Corner - 17 Replies
Hi all :D,
Im a amateur in VB.NET, and I never programmed a tool for Silkroad except a Spammer.
Today, I would like to introduce me to OpCode, in order to make small programs.
But the problem is that I do not know how to write code in VB.NET, for send to server opcodes, how this happens.
So, I've already use edxSilkroadLoader5 for capture OPCODES in game :
|
New OpCodes
05/20/2010 - Perfect World - 0 Replies
Im looking for OpCodes in Perfect World MS Version to get the Code working.
How to get them or any have the right ones ?
Func AutoRun($x, $y, $z)
;-------------------------------------
Local $result, $process, $code_add, $thread, $param_add
Local $Param = DllStructCreate("float ")
DllStructSetData($Param, 1, $x, 1)
|
How to get the sro opcodes?
01/19/2010 - Silkroad Online - 5 Replies
I would like to get the opcodes of silkroad but where can i get them in the ip packets or in the sro_client ?
i already sniffed some stuff with smartsniff but how can i see what's in it cuz of the encryption or whatever it is.
and i used ollydbg to open sro_client.exe but i couldn't find anything cuz i don't know how that program works. i see something like: SRO_Clie.0065990B but is that a opcode? and what does it do?
greetz,
kevin_owner.
|
All times are GMT +1. The time now is 03:49.
|
|