Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Commit

Permalink
#85
Browse files Browse the repository at this point in the history
  • Loading branch information
4ra1n committed Dec 21, 2022
1 parent 41b101f commit 33f5c88
Show file tree
Hide file tree
Showing 8 changed files with 601 additions and 28 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ Bugs:
- null

Others:
- [important] [feat] 添加子域名扫描的功能 #85
- [important] [feat] 指定多个poc扫描的实现方式 #82
- [important] 用户可选关闭后保留日志用于调试 #83
- [feat] 不配置目标的时候应该禁止主动扫描 #81
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@

![](img/20.png)


## 子域名扫描

在1.0版本以后支持子域名扫描:

![](img/00005.jpg)

## 反连平台

1. 点击`配置服务端`
Expand Down
6 changes: 6 additions & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ Note: First enter the port to enable passive scanning, and then open the `rad` c

![](../img/20.png)

## Subdomain Scan

After version 1.0, we support subdomain scan:

![](../img/00005.jpg)

## Reverse

1. Click Configure Server
Expand Down
Binary file added img/00005.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 24 additions & 16 deletions src/main/java/com/chaitin/xray/form/MainForm.form
Original file line number Diff line number Diff line change
Expand Up @@ -613,19 +613,11 @@
<text value="点击联动"/>
</properties>
</component>
<component id="596df" class="javax.swing.JButton" binding="radDownButton">
<constraints>
<grid row="1" column="2" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="rad下载网站"/>
</properties>
</component>
</children>
</grid>
</children>
</grid>
<grid id="a03a5" binding="otherPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="a03a5" binding="otherPanel" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="6" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
Expand All @@ -635,36 +627,52 @@
</properties>
<border type="none" title="其他"/>
<children>
<component id="6ff8c" class="javax.swing.JButton" binding="lookupCmdButton">
<component id="63b51" class="javax.swing.JButton" binding="subDomainButton">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="查看当前命令"/>
<text value="子域名扫描"/>
</properties>
</component>
<component id="84055" class="javax.swing.JButton" binding="xrayUrlButton">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="xray下载网站"/>
</properties>
</component>
<component id="cbb9c" class="javax.swing.JButton" binding="lookupConfigButton">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="查看当前配置文件"/>
</properties>
</component>
<component id="dc88" class="javax.swing.JButton" binding="cleanAreaButton">
<component id="6ff8c" class="javax.swing.JButton" binding="lookupCmdButton">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="查看当前命令"/>
</properties>
</component>
<component id="dc88" class="javax.swing.JButton" binding="cleanAreaButton">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="清空命令行输出"/>
</properties>
</component>
<component id="84055" class="javax.swing.JButton" binding="xrayUrlButton">
<component id="596df" class="javax.swing.JButton" binding="radDownButton">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="xray下载网站"/>
<text value="rad下载网站"/>
</properties>
</component>
</children>
Expand Down
60 changes: 48 additions & 12 deletions src/main/java/com/chaitin/xray/form/MainForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ public class MainForm {
private JPanel levelPanel;
public JCheckBox delLogCheckBox;
private JButton radDownButton;
private JButton subDomainButton;
private SubdomainForm subdomainInstance;

public void init() {
checkBoxList = new ArrayList<>();
Expand Down Expand Up @@ -1570,6 +1572,7 @@ public void refreshLang() {
delLogCheckBox.setText("Delete All Logs When Exit");
levelButton.setText("Set Level");
radDownButton.setText("Rad Download");
subDomainButton.setText("Subdomain Scan");
} else if (LANG == CHINESE) {
xrayPathLabel.setText("你选择的xray文件是:");
noteLabel.setText("<html> 注意:在 Mac OS 中请用 control+c/v 复制/粘贴 </html>");
Expand Down Expand Up @@ -1656,6 +1659,7 @@ public void refreshLang() {
delLogCheckBox.setText("关闭后删除日志");
levelButton.setText("设置等级");
radDownButton.setText("rad下载网站");
subDomainButton.setText("子域名扫描");
}
}

Expand All @@ -1666,6 +1670,9 @@ private void initExit() {
if (radInstance != null) {
radInstance.stop = true;
}
if (subdomainInstance != null) {
subdomainInstance.stop = true;
}
try {
Thread.sleep(3000);
} catch (Exception ignored) {
Expand Down Expand Up @@ -1693,6 +1700,31 @@ private void initGetRad() {
});
}

private void initSubdomain() {
subDomainButton.addActionListener(e -> {
String t;
if (LANG == CHINESE) {
t = "子域名扫描";
} else {
t = "Subdomain Scan";
}
if (!StringUtil.notEmpty(xrayCmd.getXray())) {
if (LANG == CHINESE) {
JOptionPane.showMessageDialog(this.SuperXray, "请先加载xray");
} else {
JOptionPane.showMessageDialog(this.SuperXray, "Load xray first");
}
return;
}
JFrame frame = new JFrame(t);
subdomainInstance = new SubdomainForm(xrayCmd);
frame.setContentPane(subdomainInstance.subdomainPanel);
frame.setResizable(false);
frame.pack();
frame.setVisible(true);
});
}

public MainForm() {
init();
initLang();
Expand All @@ -1719,6 +1751,7 @@ public MainForm() {
initHttpUtil();
initListenUtil();
initEncodeUtil();
initSubdomain();
initOther();
initExit();
}
Expand Down Expand Up @@ -1996,26 +2029,29 @@ public static void startMainForm() {
radButton = new JButton();
radButton.setText("点击联动");
mitmPanel.add(radButton, new GridConstraints(1, 5, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
radDownButton = new JButton();
radDownButton.setText("rad下载网站");
mitmPanel.add(radDownButton, new GridConstraints(1, 2, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
otherPanel = new JPanel();
otherPanel.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
otherPanel.setLayout(new GridLayoutManager(3, 2, new Insets(0, 0, 0, 0), -1, -1));
otherPanel.setBackground(new Color(-725535));
rightConfigPanel.add(otherPanel, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
otherPanel.setBorder(BorderFactory.createTitledBorder(null, "其他", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
lookupCmdButton = new JButton();
lookupCmdButton.setText("查看当前命令");
otherPanel.add(lookupCmdButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
subDomainButton = new JButton();
subDomainButton.setText("子域名扫描");
otherPanel.add(subDomainButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
xrayUrlButton = new JButton();
xrayUrlButton.setText("xray下载网站");
otherPanel.add(xrayUrlButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
lookupConfigButton = new JButton();
lookupConfigButton.setText("查看当前配置文件");
otherPanel.add(lookupConfigButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
otherPanel.add(lookupConfigButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
lookupCmdButton = new JButton();
lookupCmdButton.setText("查看当前命令");
otherPanel.add(lookupCmdButton, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
cleanAreaButton = new JButton();
cleanAreaButton.setText("清空命令行输出");
otherPanel.add(cleanAreaButton, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
xrayUrlButton = new JButton();
xrayUrlButton.setText("xray下载网站");
otherPanel.add(xrayUrlButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
otherPanel.add(cleanAreaButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
radDownButton = new JButton();
radDownButton.setText("rad下载网站");
otherPanel.add(radDownButton, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
midConfigPanel = new JPanel();
midConfigPanel.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));
midConfigPanel.setBackground(new Color(-725535));
Expand Down
Loading

0 comments on commit 33f5c88

Please sign in to comment.