Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bit4woo committed Dec 14, 2021
2 parents 5e6ea95 + 840cd8a commit 6fa8638
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/burp/Commons.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static boolean isResponseNull(IHttpRequestResponse message){
*/
public static boolean uselessExtension(String urlpath) {
String extensions = "css|jpeg|gif|jpg|png|rar|zip|svg|jpeg|ico|woff|woff2|ttf|otf";
String[] extList = extensions.split("|");
String[] extList = extensions.split("\\|");
for ( String item:extList) {
if(urlpath.endsWith("."+item)) {
return true;
Expand Down Expand Up @@ -721,8 +721,12 @@ public static void test7() {
System.out.println(IPSet);
System.out.println(CDNSet);
}

public static void test8() {
System.out.println(uselessExtension("abc.css"));
}

public static void main(String args[]) {
test7();
test8();
}
}
8 changes: 4 additions & 4 deletions src/test/urltest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ public class urltest
public static void main(String [] args)
{
//System.out.println(getFullUrlStringWithoutDefaultPort());
test3();
test();
}
public void test() {
public static void test() {
try
{
URL url = new URL("https://www.runoob.com/index.html?language=cn#j2se");
URL url1 = new URL("https://www.runoob.com:443/index.html?language=cn#j2se");
URL url = new URL("https://www.runoob.com/xxxx/index.html?language=cn#j2se");
URL url1 = new URL("https://www.runoob.com:443/xxxx/index.html?language=cn#j2se");
System.out.println(url.equals(url1));
System.out.println("URL 为:" + url.toString());
System.out.println("协议为:" + url.getProtocol());
Expand Down

0 comments on commit 6fa8638

Please sign in to comment.