if u mistaken the size it may work and may DC so write it correctly is the best way u insure u build stable tool ,
the size field is the number of bytes in the data field ,the data field start after the direction or security bytes to the end of the packet so in case of sit packet (704f) the data field is 04 and in the purification pills (704c) it is the {216c09}
And :- byte = 2 digits
so u got 2 digits in data field of the sit packet then u got 1 byte ,and u got 6 digits in the purification pills packet so u have 3 bytes and .....etc )
and its easy to make the autoit calculate it automatically , here i will share a function that u just enter the opcode and data field ,and encrypt and it will build the packet for u .
Code:
func SendPacket($txopcode,$encrypt,$data) ; this will reverse the opcode bytes for u
$op1=StringMid($txopcode,3,2)
$op2=StringMid($txopcode,1,2)
$sopcode=$op1&$op2
$ln=Hex(Int(StringLen($sdata)/2),4) ; this will calculate the size for u
$ln1=StringMid($ln,3,2)
$ln2=StringMid($ln,1,2)
$lns=$ln1&$ln2
if $encrypt = true then
$security="0300"
else
$security="0100"
EndIf
$packet=("0x"&$lns&$sopcode&$security&$data)
TCPSend($socket,$packet)
examples :-
sit packet :-
SendPacket("704f",false,"04")
purification pills:-
SendPacket("704c",true,"216c09")
Note this will work only with proxy thats use 0001 for unencrypted and 0003 for encrypted like PHconnector or Nuconnector