I’m creating a bot, where i would load this site and open the browser game
i the webbrowser in C# to load the page, and then it loads the java applet. Since the game is partwise based on this java applet and is (through java applet) connected to a socket where it sends the commands. My question is then, how do i “hook” this socket and send commands ? – I know the commands cause i decompiled the java applet, i just don’t know the approach of “hooking” the socket
I’m creating a bot, where i would load this site and open the browser
Share
If I’m understanding your question right, it sounds like you have a java applet that is connecting to an IP address somewhere on the Internet and communicating with a server at that IP address through a socket.
If this is the case, you can’t hook into the socket per se. What you can do is use a network sniffer such as Wireshark to find out what the IP Address or server name is that its communicating with. Then you can edit your Hosts file and point the IP Address that the applet is using to point to 127.0.0.1, which is your local machine.
After doing that, you can make a TCP/IP Server that runs on your local machine and you can have it do whatever you need. Look here for an example on how to make a TCP/IP server in C#.