Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kN6jq committed Jul 18, 2024
1 parent 55cfb16 commit 6e5e6c4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 25 deletions.
6 changes: 2 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.xm17</groupId>
<artifactId>gatherBurp</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>gatherBurp</name>
Expand Down Expand Up @@ -39,14 +39,12 @@
<artifactId>sqlite-jdbc</artifactId>
<version>3.43.2.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.json/json -->
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.83</version>
</dependency>

<dependency>
<groupId>net.portswigger.burp.extender</groupId>
<artifactId>burp-extender-api</artifactId>
Expand All @@ -60,7 +58,7 @@
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>
<version>5.8.16</version>
<version>5.8.28</version>
</dependency>
</dependencies>

Expand Down
7 changes: 3 additions & 4 deletions src/main/java/burp/ui/RouteUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import burp.*;
import burp.bean.RouteBean;
import burp.dao.RouteDao;
import burp.utils.CustomScanIssue;
import burp.utils.ExpressionUtils;
import burp.utils.Utils;
Expand All @@ -14,13 +13,12 @@
import java.awt.event.ActionEvent;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.*;
import java.util.List;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import static burp.dao.RouteDao.*;
import static burp.utils.Utils.getSuffix;

/**
* @Author Xm17
Expand Down Expand Up @@ -89,7 +87,7 @@ public void init() {


// 获取payload
List<RouteBean> routeList = getRouteLists();
routeList = getRouteLists();

setupUI();
setupData();
Expand Down Expand Up @@ -208,6 +206,7 @@ public void actionPerformed(ActionEvent e) {
RouteBean routeBean1 = routeLists.get(i);
routelog.add(new RouteEntry(i, routeBean1.getEnable(), routeBean1.getName(), routeBean1.getPath(), routeBean1.getExpress()));
}
routeList = getRouteLists();
ruleTable.updateUI();
}
});
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/burp/ui/SocksUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void writeIpPortSettings(IBurpExtenderCallbacks callbacks,String ip,Strin


try{
String jsonStr = FileUtil.readString(Utils.SocksConfigFile("socks.json"), "utf-8");
String jsonStr = FileUtil.readString(Utils.SocksConfigFile("socks.json"),"utf-8");
JSONObject jsonObject = JSON.parseObject(jsonStr);
boolean dns_over_socks_update = jsonObject.getBoolean("dns_over_socks");
boolean use_user_options_update = jsonObject.getBoolean("use_user_options");
Expand Down Expand Up @@ -144,7 +144,7 @@ public void writeIpPortSettings(IBurpExtenderCallbacks callbacks,String ip,Strin
public void isEnableSettings(IBurpExtenderCallbacks callbacks,boolean enable) {

try{
String jsonStr = FileUtil.readString(Utils.SocksConfigFile("socks.json"), "utf-8");
String jsonStr = FileUtil.readString(Utils.SocksConfigFile("socks.json"),"utf-8");
JSONObject jsonObject = JSON.parseObject(jsonStr);
boolean dns_over_socks_update = jsonObject.getBoolean("dns_over_socks");
boolean use_user_options_update = jsonObject.getBoolean("use_user_options");
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/burp/ui/SqlUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

import static burp.IParameter.*;
import static burp.dao.SqlDao.*;
import static burp.utils.Utils.getSuffix;

/**
* @Author Xm17
Expand Down Expand Up @@ -195,11 +194,11 @@ public static void Check(IHttpRequestResponse[] responses, boolean isSend) {
checkedDoubleQuote.getResponse().length != checkedTripleQuote.getResponse().length &&
checkedSingleQuote.getResponse().length != checkedTripleQuote.getResponse().length) {
if (formattedScore2 == formattedScore4 && (formattedScore2 != formattedScore3 || formattedScore3 != formattedScore4)) {
addToVulStr(logid, "参数" + paraName + "存在盲注");
addToVulStr(logid, "参数" + paraName + "可能存在盲注");
IScanIssue issues = null;
try {
issues = new CustomScanIssue(checkedDoubleQuote.getHttpService(), new URL(url), new IHttpRequestResponse[]{checkedDoubleQuote},
"SqlInject Blind", "SqlInject 发现盲注",
"SqlInject Blind", "SqlInject 发现可能存在盲注",
"High", "Certain");
Utils.callbacks.addScanIssue(issues);
} catch (MalformedURLException e) {
Expand Down Expand Up @@ -316,11 +315,11 @@ public static void Check(IHttpRequestResponse[] responses, boolean isSend) {
double formattedScore4 = Double.parseDouble(String.format("%.2f", score4));

if (formattedScore2 == formattedScore4 && (formattedScore2 != formattedScore3 || formattedScore3 != formattedScore4)) {
addToVulStr(logid, "参数" + paraName + "存在盲注");
addToVulStr(logid, "参数" + paraName + "可能存在盲注");
IScanIssue issues = null;
try {
issues = new CustomScanIssue(checkedJsonDoubleQuote.getHttpService(), new URL(url), new IHttpRequestResponse[]{checkedJsonDoubleQuote},
"SqlInject Blind", "SqlInject 发现盲注",
"SqlInject Blind", "SqlInject 发现可能存在盲注",
"High", "Certain");
Utils.callbacks.addScanIssue(issues);
} catch (MalformedURLException e) {
Expand Down
13 changes: 3 additions & 10 deletions src/main/java/burp/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
import burp.IHttpRequestResponse;
import cn.hutool.core.io.FileUtil;

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.*;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
Expand All @@ -25,7 +24,7 @@ public class Utils {
public static PrintWriter stdout;
public static PrintWriter stderr;
public static String name = "GatherBurp";
public static String version = "1.1.0";
public static String version = "1.1.1";
public static String author = "Xm17";
public static String workdir = System.getProperty("user.home") + "/.gather/";
public static boolean isSelect = false;
Expand Down Expand Up @@ -216,12 +215,6 @@ public static List<String> getSuffix() {
return suffix;
}


// 返回当前时间戳
public static String getTimeNow() {
return String.valueOf(System.currentTimeMillis() / 1000);
}

// 替换字符串中的特殊字符
public static String ReplaceChar(String input) {
// 使用正则表达式替换特殊字符
Expand Down

0 comments on commit 6e5e6c4

Please sign in to comment.