-
Notifications
You must be signed in to change notification settings - Fork 185
Expand file tree
/
Copy pathTools.java
More file actions
executable file
·85 lines (77 loc) · 2.3 KB
/
Tools.java
File metadata and controls
executable file
·85 lines (77 loc) · 2.3 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
80
81
82
83
84
85
package util;
import exploit.*;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* Author 莲花 2021/6/15
*/
public class Tools {
public static boolean checkTheURL(String weburl) {
if (!weburl.startsWith("http")) {
return false;
}
return true;
}
public static BasePayload getPayload(String select) {
BasePayload bp = null;
Exp_list list = new Exp_list();
List exp_list = list.get_exp();
if (select.startsWith((String) exp_list.get(0))) {
bp = new tp50();
}
if (select.startsWith((String) exp_list.get(1))) {
bp = new tp5010();
}
if (select.startsWith((String) exp_list.get(2))) {
bp = new tp5022_5129();
}
if (select.startsWith((String) exp_list.get(3))) {
bp = new tp5023();
}
if (select.startsWith((String) exp_list.get(4))) {
bp = new tp5024_5130();
}
if (select.startsWith((String) exp_list.get(5))) {
bp = new tp5_db();
}
if (select.startsWith((String) exp_list.get(6))) {
bp = new tp5_log();
}
if (select.startsWith((String) exp_list.get(7))) {
bp = new tp3();
}
if (select.startsWith((String) exp_list.get(8))) {
bp = new tp3_log();
}
if (select.startsWith((String) exp_list.get(9))) {
bp = new tp3_log_rce();
}if (select.startsWith((String) exp_list.get(10))) {
bp = new tp6_log();
}
return bp;
}
public static String addTheURL(String weburl) {
if (!weburl.startsWith("http")) {
weburl = "http://" + weburl;
}
return weburl;
}
public static List read_file(String file) throws IOException {
List<String> list = new ArrayList();
try {
BufferedReader br = new BufferedReader(new FileReader(file));
String url;
while ((url = br.readLine()) != null) {
url = addTheURL(url);
list.add(url);
}
br.close();
} catch (Exception e) {
e.printStackTrace();
}
return list;
}
}