File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -7,16 +7,22 @@ if [ "$#" -ne 1 ]; then
77fi
88
99input_file=" $1 "
10- output_file=" trackers_best.txt"
10+ output_file_http=" trackers_best_http.txt"
11+ output_file_https=" trackers_best_https.txt"
12+ output_file_udp=" trackers_best_udp.txt"
13+ output_file_wss=" trackers_best_wss.txt"
1114
1215# 检查文件是否存在
1316if [ ! -f " $input_file " ]; then
1417 echo " Error: File not found."
1518 exit 1
1619fi
1720
18- # 清空输出文件
19- > " $output_file "
21+ # 清空所有输出文件
22+ > " $output_file_http "
23+ > " $output_file_https "
24+ > " $output_file_udp "
25+ > " $output_file_wss "
2026
2127# 过滤掉包含blackstr.txt中恶意IP的URL,然后逐行处理
2228{
3238 http)
3339 if curl -s -f -m 1 " $tracker " & > /dev/null; then
3440 echo " Success: $tracker "
35- echo " $tracker " >> " $output_file "
41+ echo " $tracker " >> " $output_file_http "
3642 else
3743 echo " Failed: $tracker "
3844 fi
3945 ;;
4046 https)
4147 if curl -s -f -m 1 " $tracker " & > /dev/null; then
4248 echo " Success: $tracker "
43- echo " $tracker " >> " $output_file "
49+ echo " $tracker " >> " $output_file_https "
4450 else
4551 echo " Failed: $tracker "
4652 fi
5157 host=$( echo " $host " | cut -d' :' -f1)
5258 if nc -zuv -w 1 " $host " " $port " & > /dev/null; then
5359 echo " Success: $tracker "
54- echo " $tracker " >> " $output_file "
60+ echo " $tracker " >> " $output_file_udp "
5561 else
5662 echo " Failed: $tracker "
5763 fi
5864 ;;
5965 wss)
6066 if wscat -c " $tracker " --timeout 1 & > /dev/null; then
6167 echo " Success: $tracker "
62- echo " $tracker " >> " $output_file "
68+ echo " $tracker " >> " $output_file_wss "
6369 else
6470 echo " Failed: $tracker "
6571 fi
You can’t perform that action at this time.
0 commit comments