Skip to content

Commit c27a22b

Browse files
committed
test
1 parent 6758c69 commit c27a22b

20 files changed

+1098
-32
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### V1.6
44

5-
使用log4j输出日志到文件
5+
使用log4j输出日志到文件.
66

77
### V1.5
88

src/main/java/fun/fireline/controller/MainController.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ private void initToolbar() {
187187

188188
} catch (Exception var) {
189189
proxyStatusLabel.setText("代理服务器配置加载失败。");
190-
logger.error(var.getStackTrace());
190+
logger.error(var);
191191
}
192192

193193

@@ -309,7 +309,7 @@ public PasswordAuthentication getPasswordAuthentication() {
309309

310310
} catch (Exception var) {
311311
this.proxyStatusLabel.setText("fofa配置加载失败。");
312-
logger.error(var.getStackTrace());
312+
logger.error(var);
313313
}
314314

315315

@@ -386,7 +386,7 @@ public void initialize() {
386386
try {
387387
Desktop.getDesktop().browse(new URL("https://github.com/yhy0").toURI());
388388
} catch (Exception e1) {
389-
logger.error(e1.getStackTrace());
389+
logger.error(e1);
390390
}
391391
} else {
392392
refreshPage(node.getAccessibleText());
@@ -461,7 +461,7 @@ private void refreshPage(String page){
461461
}
462462
}
463463
} catch (IOException e) {
464-
logger.error(e.getStackTrace());
464+
logger.error(e);
465465
}
466466
}
467467

src/main/java/fun/fireline/controller/OthersController.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public void table_view(HashSet<String> values) {
249249
this.datas.add(new VulInfo(String.valueOf(i), target, isVul));
250250
}
251251
} catch (Exception e) {
252-
logger.error(e.getStackTrace());
252+
logger.error(e);
253253
}
254254

255255
//映射数据进每列
@@ -401,8 +401,8 @@ public void fofa_search() {
401401

402402

403403
} catch (Exception e) {
404-
logger.error(e.getStackTrace());
405-
result = e.getStackTrace().toString();
404+
logger.error(e);
405+
result = e.toString();
406406
}
407407

408408
this.fofa_result_info.setText(result);
@@ -467,7 +467,7 @@ public void initialize() {
467467
this.defaultInformation();
468468
this.basic();
469469
} catch (Exception e) {
470-
logger.error(e.getStackTrace());
470+
logger.error(e);
471471
}
472472
}
473473

src/main/java/fun/fireline/controller/Struts2Controller.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ public void fofa_search() {
387387
String values = Tools.read(Constants.FOFAPATH,"UTF-8", false).toString();
388388
values = values.substring(1,values.length()-1);;
389389

390-
System.out.println(values);
391390
String[] EmaliKey = values.split(":");
392391
if(EmaliKey.length == 2) {
393392
String email = EmaliKey[0];
@@ -424,7 +423,7 @@ public void fofa_search() {
424423

425424
} catch (Exception e) {
426425
e.printStackTrace();
427-
result = e.getStackTrace().toString();
426+
result = e.toString();
428427

429428
}
430429

src/main/java/fun/fireline/core/CVE_2020_14882.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public boolean checkVUL(String url) {
5050
return flag;
5151

5252
} catch (Exception e) {
53-
logger.error(e.getStackTrace());
53+
logger.error(e);
5454
}
5555

5656
return false;
@@ -69,7 +69,7 @@ public String exeCMD(String cmd, String encoding) {
6969
return result + "\r\n 命令执行成功";
7070

7171
} catch (Exception e) {
72-
logger.error(e.getStackTrace());
72+
logger.error(e);
7373
}
7474
return "命令执行失败";
7575
}

src/main/java/fun/fireline/core/CVE_2021_22986.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public boolean checkVUL(String url) {
5353
return flag;
5454

5555
} catch (Exception e) {
56-
logger.error(e.getStackTrace());
56+
logger.error(e);
5757
}
5858

5959
return false;
@@ -79,7 +79,7 @@ public String exeCMD(String cmd, String encoding){
7979
return result + "\r\n 命令执行成功";
8080

8181
} catch (Exception e) {
82-
logger.error(e.getStackTrace());
82+
logger.error(e);
8383
}
8484
return "命令执行失败";
8585
}

src/main/java/fun/fireline/exp/apache/struts2/S2_005.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public boolean checkVUL(String url) {
3333
}
3434
return flag;
3535
} catch (Exception e) {
36-
logger.error(e.getStackTrace());
36+
logger.error(e);
3737
}
3838
return false;
3939
}
@@ -46,7 +46,7 @@ public String exeCMD(String cmd, String encoding) {
4646
return result;
4747

4848
} catch (Exception e) {
49-
logger.error(e.getStackTrace());
49+
logger.error(e);
5050
}
5151
return "fail";
5252
}
@@ -58,7 +58,7 @@ public String getWebPath() {
5858
return result;
5959

6060
} catch (Exception e) {
61-
logger.error(e.getStackTrace());
61+
logger.error(e);
6262
}
6363
return "命令执行失败";
6464
}

src/main/java/fun/fireline/exp/cms/nc/CNVD_2021_30167.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public boolean checkVUL(String url) {
3636
}
3737
return flag;
3838
} catch (Exception e) {
39-
logger.error(e.getStackTrace());
39+
logger.error(e);
4040
}
4141
return false;
4242
}

src/main/java/fun/fireline/tools/HttpTool.java

+15-13
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ public static String httpRequest(String requestUrl, int timeOut, String requestM
4444
if(!requestUrl.contains("http")) {
4545
requestUrl = "http://" + requestUrl;
4646
}
47-
//代理
48-
Proxy proxy = (Proxy) MainController.settingInfo.get("proxy");
4947

5048
try {
5149
URL url = new URL(requestUrl);
@@ -55,6 +53,8 @@ public static String httpRequest(String requestUrl, int timeOut, String requestM
5553
TrustManager[] tm = { new fun.fireline.tools.MyCERT() };
5654
sslContext.init(null, tm, new SecureRandom());
5755
SSLSocketFactory ssf = sslContext.getSocketFactory();
56+
//代理
57+
Proxy proxy = (Proxy) MainController.settingInfo.get("proxy");
5858

5959
if(proxy != null) {
6060
hsc = (HttpsURLConnection)url.openConnection(proxy);
@@ -65,6 +65,9 @@ public static String httpRequest(String requestUrl, int timeOut, String requestM
6565
hsc.setHostnameVerifier(allHostsValid);
6666
httpUrlConn = hsc;
6767
} else {
68+
//代理
69+
Proxy proxy = (Proxy) MainController.settingInfo.get("proxy");
70+
6871
if(proxy != null) {
6972
hc = (HttpURLConnection)url.openConnection(proxy);
7073
} else {
@@ -82,7 +85,6 @@ public static String httpRequest(String requestUrl, int timeOut, String requestM
8285
if (contentType != null && !"".equals(contentType))
8386
httpUrlConn.setRequestProperty("Content-Type", contentType);
8487

85-
8688
httpUrlConn.setRequestProperty("User-Agent", "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)");
8789
httpUrlConn.setRequestProperty("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9");
8890
httpUrlConn.setRequestProperty("Accept-Encoding", "gzip, deflate");
@@ -104,14 +106,14 @@ public static String httpRequest(String requestUrl, int timeOut, String requestM
104106
String result = readString(inputStream, encoding);
105107
return result;
106108
} catch (IOException ie) {
107-
logger.error(ie.getStackTrace());
109+
logger.error(ie);
108110
if (hsc != null)
109111
return readString(hsc.getErrorStream(), encoding);
110112
if (hc != null)
111113
return readString(hc.getErrorStream(), encoding);
112114
return "";
113115
} catch (Exception e) {
114-
logger.error(e.getStackTrace());
116+
logger.error(e);
115117
throw e;
116118
} finally {
117119
if (hsc != null)
@@ -212,10 +214,10 @@ public static String headerByHttpRequest(String requestUrl, int timeOut, String
212214
}
213215
return "";
214216
} catch (IOException e) {
215-
logger.error(e.getStackTrace());
217+
logger.error(e);
216218
throw e;
217219
} catch (Exception e) {
218-
logger.error(e.getStackTrace());
220+
logger.error(e);
219221
throw e;
220222
} finally {
221223
if (br != null)
@@ -250,7 +252,7 @@ public static String readString(InputStream inputStream, String encoding) throws
250252
}
251253

252254
} catch (IOException e) {
253-
logger.error(e.getStackTrace());
255+
logger.error(e);
254256
} finally {
255257
if (baos != null) {
256258
baos.flush();
@@ -362,7 +364,7 @@ public static String httpRequestAddHeader(String requestUrl, int timeOut, String
362364
if (hc != null) {
363365
hc.disconnect();
364366
}
365-
logger.error(e.getStackTrace());
367+
logger.error(e);
366368
throw e;
367369
}
368370

@@ -388,7 +390,7 @@ public static String ImageToBase64ByOnline(String imgURL) {
388390
// 关闭流
389391
is.close();
390392
} catch (IOException e) {
391-
logger.error(e.getStackTrace());
393+
logger.error(e);
392394
e.printStackTrace();
393395
}
394396
// 对字节数组Base64编码
@@ -462,10 +464,10 @@ public static int codeByHttpRequest(String requestUrl, int timeOut, String reque
462464
return hc.getResponseCode();
463465
return 0;
464466
} catch (IOException e) {
465-
logger.error(e.getStackTrace());
467+
logger.error(e);
466468
throw e;
467469
} catch (Exception e) {
468-
logger.error(e.getStackTrace());
470+
logger.error(e);
469471
throw e;
470472
} finally {
471473
if (br != null)
@@ -582,7 +584,7 @@ public static boolean downloadFile(String downURL, File file) throws Exception {
582584
out.write(buf, 0, size);
583585
}
584586
} catch (Exception e) {
585-
logger.error(e.getStackTrace());
587+
logger.error(e);
586588
throw e;
587589
} finally {
588590
if (bin != null)

target/classes/css/main.css

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#header {
2+
-fx-background-color: #3A3A3A;
3+
}
4+
5+
.menu-bar {
6+
-fx-background-color: #3A3A3A;
7+
-fx-focused-text-base-color: #ff2f34 ;
8+
9+
-fx-selection-bar: #ff3030;
10+
}
11+
12+
.menu-button {
13+
-fx-background-color: #3A3A3A;
14+
}
15+
16+
.menu-button .label{
17+
-fx-text-fill: white;
18+
}
19+
20+
.menu-item .label{
21+
-fx-text-fill: black;
22+
}
23+
24+
25+
#vBox {
26+
-fx-background-color: #2b2b2b;
27+
}
28+
29+
.jfx-hamburger StackPane {
30+
-fx-background-color: white;
31+
}
32+
33+
.menu:hover{
34+
-fx-background-color: #ff2f34;
35+
}
36+
37+
38+
39+
/* tabPane 选择栏的样式 */
40+
41+
.tab-pane .tab-header-area .tab-header-background {
42+
-fx-opacity: 0;
43+
}
44+
45+
.tab-pane
46+
{
47+
-fx-tab-min-width:90px;
48+
}
49+
50+
.tab{
51+
-fx-background-insets: 0 1 0 1,0,0;
52+
}
53+
.tab-pane .tab
54+
{
55+
-fx-background-color: #e6e6e6;
56+
57+
}
58+
59+
.tab-pane .tab:selected
60+
{
61+
-fx-background-color: #3c3c3c;
62+
}
63+
64+
.tab .tab-label {
65+
-fx-alignment: CENTER;
66+
-fx-text-fill: #828282;
67+
-fx-font-size: 12px;
68+
-fx-font-weight: bold;
69+
}
70+
71+
.tab:selected .tab-label {
72+
-fx-alignment: CENTER;
73+
-fx-text-fill: #96b946;
74+
}
75+
76+
.tab-pane:top *.tab-header-area {
77+
-fx-background-insets: 0, 0 0 1 0;
78+
/* 最后一个参数是调整距左边长度的,最好调整至此,不然切换不同fxml时,
79+
左边栏出来的会覆盖一层看不见的窗口,导致那一块不能点击*/
80+
-fx-padding: 0.416667em 0.166667em 0.0em 13em;
81+
}
82+

target/classes/fxml/Fastjson.fxml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<?import com.jfoenix.controls.*?>
4+
<?import java.lang.*?>
5+
<?import javafx.scene.layout.*?>
6+
<?import javafx.scene.text.*?>
7+
<?import com.jfoenix.controls.JFXButton?>
8+
<?import javafx.scene.layout.AnchorPane?>
9+
<?import javafx.scene.text.Font?>
10+
11+
<AnchorPane prefHeight="639.0" prefWidth="901.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
12+
<children>
13+
<JFXButton layoutX="330.0" layoutY="246.0" prefHeight="70.0" prefWidth="200.0" text="Fastjson Page" textFill="#ff4f3f">
14+
<font>
15+
<Font size="30.0" />
16+
</font>
17+
</JFXButton>
18+
</children>
19+
</AnchorPane>

0 commit comments

Comments
 (0)