diff --git a/pom.xml b/pom.xml index 7bf467e..afc606a 100644 --- a/pom.xml +++ b/pom.xml @@ -41,10 +41,11 @@ 5.8.26 - com.alibaba - fastjson - 2.0.0 + com.alibaba.fastjson2 + fastjson2 + 2.0.49 + org.reflections reflections diff --git a/src/main/java/com/rabbitq/SubdomainBrute.java b/src/main/java/com/rabbitq/SubdomainBrute.java index 1ee711d..8314721 100644 --- a/src/main/java/com/rabbitq/SubdomainBrute.java +++ b/src/main/java/com/rabbitq/SubdomainBrute.java @@ -42,7 +42,7 @@ public static void taskConf(TargetOptionsEntity targetOptionsEntity) { for (SubDomainInterface impl : implementations) { try { setSubDomain.addAll(impl.getSubDomain(targetOptionsEntity)); - System.out.println(impl.getClass().getName()); + //System.out.println(impl.getClass().getName()); } catch (Exception e) { // 捕捉子类方法执行的异常 System.out.println("Exception in calling method: " + e.getMessage()); diff --git a/src/main/java/com/rabbitq/models/impl/AlienVault.java b/src/main/java/com/rabbitq/models/impl/AlienVault.java index 278b5ec..3f3f06f 100644 --- a/src/main/java/com/rabbitq/models/impl/AlienVault.java +++ b/src/main/java/com/rabbitq/models/impl/AlienVault.java @@ -1,16 +1,13 @@ package com.rabbitq.models.impl; import cn.hutool.http.HttpRequest; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson2.JSONArray; +import com.alibaba.fastjson2.JSONObject; import com.rabbitq.annotations.SubDomainInterfaceImplementation; import com.rabbitq.entity.TargetOptionsEntity; import com.rabbitq.models.SubDomainInterface; import javax.net.ssl.*; -import java.io.IOException; -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import java.util.HashSet; @@ -68,7 +65,7 @@ public boolean verify(String hostname, SSLSession session) { System.out.println("\033[32m[*]\033[0m通过AlienVaul接口获取完成" + ",共获取到" + setResult.size() + "子域"); } catch (Exception e){ - System.out.println("\033[31msitedossier获取失败,原因:" + e); + System.out.println("\033[31mAlienVaul接口获取失败,原因:" + e); } return setResult; diff --git a/src/main/java/com/rabbitq/models/impl/Anubis.java b/src/main/java/com/rabbitq/models/impl/Anubis.java index 9fa8c43..5cac598 100644 --- a/src/main/java/com/rabbitq/models/impl/Anubis.java +++ b/src/main/java/com/rabbitq/models/impl/Anubis.java @@ -5,7 +5,6 @@ import com.rabbitq.entity.TargetOptionsEntity; import com.rabbitq.models.SubDomainInterface; -import java.io.IOException; import java.util.Arrays; import java.util.HashSet; import java.util.Set; @@ -34,7 +33,7 @@ public Set getSubDomain(TargetOptionsEntity targetOptionsEntity) { setResult=Arrays.stream(arrResult).collect(Collectors.toSet()); System.out.println("\033[32m[*]\033[0m通过anubis接口获取完成" + ",共获取到" + setResult.size() + "子域"); }catch (Exception e){ - System.out.println("\033[31msitedossier获取失败,原因:" + e); + System.out.println("\033[31manubis接口获取失败,原因:" + e); } return setResult; diff --git a/src/main/java/com/rabbitq/models/impl/DomainGlass.java b/src/main/java/com/rabbitq/models/impl/DomainGlass.java index 842a16e..5d46ede 100644 --- a/src/main/java/com/rabbitq/models/impl/DomainGlass.java +++ b/src/main/java/com/rabbitq/models/impl/DomainGlass.java @@ -1,8 +1,5 @@ package com.rabbitq.models.impl; -import cn.hutool.http.HttpRequest; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; import com.rabbitq.annotations.SubDomainInterfaceImplementation; import com.rabbitq.entity.TargetOptionsEntity; import com.rabbitq.models.SubDomainInterface; @@ -12,9 +9,6 @@ import org.jsoup.select.Elements; import javax.net.ssl.*; import java.io.IOException; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; -import java.util.Collections; import java.util.HashSet; import java.util.Set; @@ -25,7 +19,6 @@ public class DomainGlass implements SubDomainInterface { public Set getSubDomain(TargetOptionsEntity targetOptionsEntity) throws Exception { String targetURL=targetOptionsEntity.getDomain(); Set setResult =new HashSet<>(); - Document document = null; try { // 信任所有证书的代码 @@ -52,11 +45,11 @@ public boolean verify(String hostname, SSLSession session) { } }); - document = Jsoup.connect("https://domain.glass/" + targetURL).get(); + Document document = Jsoup.connect("https://domain.glass/" + targetURL).get(); setResult=solvePage(document); System.out.println("\033[32m[*]\033[0m通过DomainGlass接口获取完成" + ",共获取到" + setResult.size() + "子域"); } catch (IOException e) { - System.out.println("\033[31mDomainGlass获取失败,原因:" + e); + System.out.println("\033[31mDomainGlass接口获取失败,原因:" + e); }