Skip to content

Commit

Permalink
修复提示文字错误,修改fastjson依赖版本,去除主类调试信息
Browse files Browse the repository at this point in the history
  • Loading branch information
Rabb1tQ committed Apr 29, 2024
1 parent 70dd5df commit 31f432e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 21 deletions.
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@
<version>5.8.26</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>2.0.0</version>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
<version>2.0.49</version>
</dependency>

<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/rabbitq/SubdomainBrute.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
9 changes: 3 additions & 6 deletions src/main/java/com/rabbitq/models/impl/AlienVault.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/rabbitq/models/impl/Anubis.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -34,7 +33,7 @@ public Set<String> 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;
Expand Down
11 changes: 2 additions & 9 deletions src/main/java/com/rabbitq/models/impl/DomainGlass.java
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;

Expand All @@ -25,7 +19,6 @@ public class DomainGlass implements SubDomainInterface {
public Set<String> getSubDomain(TargetOptionsEntity targetOptionsEntity) throws Exception {
String targetURL=targetOptionsEntity.getDomain();
Set<String> setResult =new HashSet<>();
Document document = null;
try {

// 信任所有证书的代码
Expand All @@ -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);
}


Expand Down

0 comments on commit 31f432e

Please sign in to comment.