Well, there's an online game I'm playing but due to some exploited bugs out there being used by script kiddies, I want to do something about it.
Now this goes like this, I'm not very good explaining myself sometimes but I hope you can bear with me
My idea is to make a kind of proxy (I've done such before for two games - personal stuff, learning how it works and doing funny things xD) that can filter such malformed packet and thus, the cheat made unworkable. The game would connect to the local IP, and my program would send the stuff in/out the server/client, BUT filtering the malformed packet.
The idea's not bad and I've progressed a bit... the thing is, I've only worked with proxies sending and receiving stuff through PeekS after a ReceiveNetworkData (basically, strings), but this game deals with byte stuff - all I need to do is to do the same, but with bytes (or packets, whatever works).
Adapting what I used to do, this time using PeekB, came around to this...
Code: Select all
InitNetwork()
c2=OpenNetworkConnection("<server IP goes here>",<server port goes here>)
c=CreateNetworkServer(<any port here>)
Repeat
a2=NetworkClientEvent(c2)
If a2=2
*buffer2=AllocateMemory(1024)
ReceiveNetworkData(c2,*buffer2,1024)
*sendbuf2=AllocateMemory(1024)
For a=0 To 1024
If PeekB(*buffer2+a)<>0
Debug "Received=" + Str(PeekB(*buffer2+a))+" "+Chr(PeekB(*buffer2+a))
EndIf
PokeB(*sendbuf2,PeekB(*buffer2+a))
Next a
SendNetworkData(c,*sendbuf2,1024)
EndIf
a=NetworkServerEvent()
If a=2
*buffer=AllocateMemory(1024)
ReceiveNetworkData(NetworkClientID(),*buffer,1024)
*sendbuf=AllocateMemory(1024)
For a=0 To 1024
If PeekB(*buffer+a)<>0
Debug "Sent: " + Str(PeekB(*buffer+a))+" "+Chr(PeekB(*buffer+a))
EndIf
PokeB(*sendbuf,PeekB(*buffer+a))
Next a
SendNetworkData(c2,*sendbuf,1024)
EndIf
Delay(1)
ForEver
With the program there I can get the correct packet stuff, but as I said, I can't get the start and/or end of it so I can send it to the game server like the real game does...
By the way, I've searched the forums, google, and stuff, but all that advanced winsock packet-like stuff confuses me LOTS
If anybody could give me a hand, it would be a great help

