Skip to content

Commit 758bc10

Browse files
committed
feat: Update README to include command-line usage instructions for Jiyu Attack script
1 parent ad36d8d commit 758bc10

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

Jiyu_attack.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ def pkg_website(url: str) -> bytes:
139139

140140

141141
if __name__ == "__main__":
142-
parser = argparse.ArgumentParser(description="Jiyu Attack Script")
142+
parser = argparse.ArgumentParser(
143+
description="Jiyu Attack Script",
144+
epilog="Github Repositories: https://github.com/weilycoder/Jiyu_udp_attack/tree/main/",
145+
)
143146
parser.add_argument("-s", "--teacher-ip", type=str, required=True, help="Teacher's IP address")
144147
parser.add_argument("-t", "--target", type=str, required=True, help="Target IP address")
145148
parser.add_argument("-p", "--port", type=int, default=4705, help="Port to send packets to (default: 4705)")

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,38 @@
66

77
## Usage
88

9-
目前暂未开发命令行,请自行阅读文档并调用函数。
9+
你可以从 Python 导入 `Jiyu_attack` 模块,也可以使用命令行。
10+
11+
使用 `Jiyu_attack.py -h` 来获取帮助信息:
12+
13+
```
14+
usage: Jiyu_attack.py [-h] -s TEACHER_IP -t TARGET [-p PORT] (-m MESSAGE | -w WEBSITE | -c COMMAND)
15+
16+
Jiyu Attack Script
17+
18+
options:
19+
-h, --help show this help message and exit
20+
-s, --teacher-ip TEACHER_IP
21+
Teacher's IP address
22+
-t, --target TARGET Target IP address
23+
-p, --port PORT Port to send packets to (default: 4705)
24+
-m, --message MESSAGE
25+
Message to send
26+
-w, --website WEBSITE
27+
Website URL to ask to open
28+
-c, --command COMMAND
29+
Command to execute on the target
30+
31+
Github Repositories: https://github.com/weilycoder/Jiyu_udp_attack/tree/main/
32+
```
33+
34+
其中目标 ip 的指定使用了 [ht0Ruial/Jiyu_udp_attack](https://github.com/ht0Ruial/Jiyu_udp_attack/) 的创意,可以:
35+
36+
+ 指定具体 ip,如 `192.168.3.103`
37+
+ 指定 ip 范围,如 `192.168.3.100-150`
38+
+ 指定 ip 段,如 `192.168.3.0/24`
39+
40+
最多指定 65536 个不同 ip。
1041

1142
## Jiyu API
1243

0 commit comments

Comments
 (0)