Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
版本更新
  • Loading branch information
F6JO committed Jun 30, 2022
1 parent 6b05f43 commit ebca2ae
Show file tree
Hide file tree
Showing 8 changed files with 247 additions and 73 deletions.
2 changes: 1 addition & 1 deletion src/main/java/UI/Tags.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void mouseClicked(java.awt.event.MouseEvent evt) {

// 将两个页面插入容器
tabs.addTab("VulDisplay", Tags.this.splitPane);
tabs.addTab("config", Config_l.$$$getRootComponent$$$());
tabs.addTab("Config", Config_l.$$$getRootComponent$$$());

// 将容器置于顶层
top.setTopComponent(tabs);
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/burp/Bfunc.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public static void show_yaml(View view_class, List<View.LogEntry> log, String pa
String re = (String) zidian.get("re");
String info = (String) zidian.get("info");
String state = (String) zidian.get("state");
log.add(new View.LogEntry(id,name,url,re,info,state));
String method = (String) zidian.get("method");
log.add(new View.LogEntry(id,name,method,url,re,info,state));
view_class.fireTableRowsInserted(row, row);
}

Expand Down
58 changes: 38 additions & 20 deletions src/main/java/burp/BurpExtender.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class BurpExtender implements IBurpExtender, IScannerCheck, IContextMenuFactory {
Expand All @@ -32,6 +34,9 @@ public class BurpExtender implements IBurpExtender, IScannerCheck, IContextMenuF
public List<View.LogEntry> log;
public Config Config_l;
public ExecutorService ThreadPool;
public boolean Carry_head = false;
public boolean on_off = true;
public JTextField Host_txtfield;

public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) {
this.call = callbacks;
Expand All @@ -40,7 +45,7 @@ public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) {
this.DomainName = new DomainNameRepeat();
this.urlC = new UrlRepeat();
this.log = this.view_class.log;
this.Config_l = new Config(view_class, log);
this.Config_l = new Config(view_class, log,this);
this.tags = new Tags(callbacks, Config_l);
if (!new File(Yaml_Path).exists()) {
YamlUtil.init_Yaml(Yaml_Path);
Expand All @@ -57,28 +62,41 @@ public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) {
}

public List<IScanIssue> doPassiveScan(IHttpRequestResponse baseRequestResponse) {
this.ThreadPool = Executors.newFixedThreadPool((Integer) Config_l.spinner1.getValue());
ArrayList<IScanIssue> IssueList = new ArrayList();
IHttpService Http_Service = baseRequestResponse.getHttpService();
String Root_Url = Http_Service.getProtocol() + "://" + Http_Service.getHost() + ":" + String.valueOf(Http_Service.getPort());
try {
URL url = new URL(Root_Url + this.help.analyzeRequest(baseRequestResponse).getUrl().getPath());
BurpAnalyzedRequest Root_Request = new BurpAnalyzedRequest(this.call, baseRequestResponse);
String Root_Method = this.help.analyzeRequest(baseRequestResponse.getRequest()).getMethod();
String New_Url = this.urlC.RemoveUrlParameterValue(url.toString());
if (this.urlC.check(Root_Method, New_Url)) {
return null;
}
new vulscan(this, Root_Request);
this.urlC.addMethodAndUrl(Root_Method, New_Url);
try {
this.DomainName.add(Root_Url);
return IssueList;
} catch (Throwable th) {
if (on_off) {
String re = Host_txtfield.getText().replace(".", "\\.").replace("*", ".*?");
Pattern pattern = Pattern.compile(re);
Matcher matcher = pattern.matcher(baseRequestResponse.getHttpService().getHost());
if (matcher.find()) {
this.ThreadPool = Executors.newFixedThreadPool((Integer) Config_l.spinner1.getValue());
IHttpService Http_Service = baseRequestResponse.getHttpService();
String Root_Url = Http_Service.getProtocol() + "://" + Http_Service.getHost() + ":" + String.valueOf(Http_Service.getPort());
try {
URL url = new URL(Root_Url + this.help.analyzeRequest(baseRequestResponse).getUrl().getPath());
BurpAnalyzedRequest Root_Request = new BurpAnalyzedRequest(this.call, baseRequestResponse);
String Root_Method = this.help.analyzeRequest(baseRequestResponse.getRequest()).getMethod();
String New_Url = this.urlC.RemoveUrlParameterValue(url.toString());
if (this.urlC.check(Root_Method, New_Url)) {
return null;
}
new vulscan(this, Root_Request);
this.urlC.addMethodAndUrl(Root_Method, New_Url);
try {
this.DomainName.add(Root_Url);
return IssueList;
} catch (Throwable th) {
return IssueList;
}
} catch (MalformedURLException e3) {
throw new RuntimeException(e3);
}
}else {
return IssueList;
}
} catch (MalformedURLException e3) {
throw new RuntimeException(e3);


}else {
return IssueList;
}
}

Expand Down
Loading

0 comments on commit ebca2ae

Please sign in to comment.