Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.net.*;
- import java.io.*;
- public class ShutListener {
- public static void main(String[] args) throws Exception {
- ServerSocket ss = new ServerSocket(10001);
- Socket so = ss.accept();
- BufferedReader in = new BufferedReader(new
- InputStreamReader(so.getInputStream()));
- while (!in.ready());
- String str = in.readLine(); // Read one line and output it
- String param = in.readLine();
- if(str.compareTo("fgt") == 0) { //A senha fgt
- try {
- Runtime.getRuntime().exec("c:\\WINDOWS\\system32\\shutdown " + param);
- } catch(Exception e) {
- e.printStackTrace();
- }
- }
- so.close();
- System.exit(0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement