├── README.md ├── linux.zip ├── linux ├── CloudflareST ├── GeoLite2-Country.mmdb ├── zjccc.sh └── 测速指令后面加了 -dd感觉没必要测速,测个延迟就行了,能通就行.txt ├── 图片 ├── Python.jpg ├── Termux.jpg └── 文件目录.jpg ├── 安卓手机.zip ├── 安卓手机 ├── 2-1 识别国家地区且整合.py ├── FDYMIP.sh ├── GFYMIP.sh ├── GeoLite2-Country.mmdb ├── guojia.sh ├── zjccc.sh └── 终端测试 │ ├── cesu.sh │ ├── ip.sh │ └── txt.sh ├── 电脑使用PY.zip ├── 电脑使用PY ├── 1-0下载并解压.py ├── 1-1获取网页.py ├── 1-2CF反代域名dns记录.py ├── 1-3 CF官方域名DNS记录(这个没必要获取地区信息.py ├── 1-4##4和1获取IP.py ├── 2-1 识别国家地区且整合.py ├── 2-2 合并地区相同的txt(用处不大直接用1-1就好了,强烈推荐.py ├── 3-0越测越开心.py ├── 4-0 通用csv表格转格式.py ├── 4-1付费csv表格提取.py ├── CloudflareST.exe ├── GFYMIP-IPv6.txt ├── GFYMIP.txt ├── GeoLite2-Country.mmdb ├── IDLE.reg ├── 分类合并.py ├── 右键py脚本没有IDLE双击IDLE.reg.txt ├── 合并CSV.bat ├── 安装Python.txt ├── 推荐使用IDLE运行,可以看到错误日志.txt ├── 整理ip.txt库.py ├── 自动扫描脚本.py ├── 自动扫描脚本notls.py └── !脚本需要安装什么东西才可以运行,自己复制到ai,他会告诉你!.txt └── 群友X发的提取vless ├── CF-IP ├── GeoLite2-Country.mmdb ├── IP库 │ └── 1.csv ├── SG.txt ├── X大佬 的新的白嫖IP的办法.md ├── bin │ └── cfiptest.exe ├── cf-ip.py ├── data │ └── 新建文本文档.txt ├── locations.json ├── 识别cf-vless..txt的国家,按国家名称放到不同的文件.zip └── 识别cf-vless.txt国家放到一个文件.zip └── vless.sh /README.md: -------------------------------------------------------------------------------- 1 | # 安卓和linux使用教程 2 | 👋👋👋 给CM杨幂点点关注👋👋👋https://github.com/cmliu 3 | 4 | 测速指令后面加了 -dd,需要测速的自己删除 5 | 感觉没必要测速,测个延迟就行了,能通就行 6 | 1. 下载[GeoLite2-Country](https://github.com/P3TERX/GeoLite.mmdb) 7 | 2. 下载[CloudflareSpeedTest](https://github.com/XIU2/CloudflareSpeedTest) 8 | 3. 运行脚本。 9 | 10 | **要安装什么库我忘记了** 11 | 12 | ### 要查看Linux系统的架构,你可以使用以下命令之一: 13 | 14 | - 用 uname 命令:`uname -m` 15 | - 这将显示机器的硬件架构信息,例如 x86_64 表示 64 位架构,i386 表示 32 位架构。 16 | - 然后github [CloudflareSpeedTest](https://github.com/XIU2/CloudflareSpeedTest) 去下载对应的版本的测速文件。(我这里的是arm64) 17 | 18 | - 装jq,你可以使用以下命令:`pkg install jq` 19 | 这将使用Termux的包管理器pkg来安装jq。安装完成后,你就可以在Termux中使用jq来处理JSON数据了。 20 | 21 | - 脚本和测速文件都给满777 22 | - 这个是Termux的根目录,下载后的东西放这里面/data/data/com.termux/files/home/(可能和我的不一样,以你自己的为主,是根目录就行) 23 | - #识别国家地区还是推荐用Python,秒出。用api有点慢。 24 | - GeoLite2-Country和libmaxminddb-tools 25 | 26 | 方法:把GeoLite2-Country复制到termux根目录/data/data/com.termux/files/home/ ,然后输入`pkg install libmaxminddb-tools`。 27 | 28 | #### Termux一键下载运行指令: 29 | 30 | - `curl -sSL -o ~/GeoLite2-Country.mmdb https://raw.githubusercontent.com/zjccc1999/Cf-fdip/main/linux/GeoLite2-Country.mmdb && chmod +x ~/GeoLite2-Country.mmdb` 31 | 32 | - `curl -sSL -o ~/zjccc.sh https://raw.githubusercontent.com/zjccc1999/Cf-fdip/main/linux/zjccc.sh && chmod +x ~/zjccc.sh && bash ~/zjccc.sh` 33 | 34 | - 代理加速Termux一键下载运行指令: 35 | 36 | - `curl -sSL -o ~/GeoLite2-Country.mmdb https://mirror.ghproxy.com/https://raw.githubusercontent.com/zjccc1999/Cf-fdip/main/linux/GeoLite2-Country.mmdb && chmod +x ~/GeoLite2-Country.mmdb` 37 | 38 | - `curl -sSL -o ~/zjccc.sh https://mirror.ghproxy.com/https://raw.githubusercontent.com/zjccc1999/Cf-fdip/main/linux/zjccc.sh && chmod +x ~/zjccc.sh && bash ~/zjccc.sh` 39 | 40 | ### 标准Linux一键下载运行指令: 41 | 42 | - `wget https://raw.githubusercontent.com/zjccc1999/Cf-fdip/main/linux/GeoLite2-Country.mmdb -O ~/GeoLite2-Country.mmdb && chmod +x ~/GeoLite2-Country.mmdb` 43 | 44 | - `wget https://raw.githubusercontent.com/zjccc1999/Cf-fdip/main/linux/zjccc.sh -O ~/zjccc.sh && chmod +x ~/zjccc.sh && bash ~/zjccc.sh` 45 | 46 | - 代理加速标准Linux一键下载运行指令: 47 | 48 | - `wget https://mirror.ghproxy.com/https://raw.githubusercontent.com/zjccc1999/Cf-fdip/main/linux/GeoLite2-Country.mmdb -O ~/GeoLite2-Country.mmdb && chmod +x ~/GeoLite2-Country.mmdb` 49 | 50 | - `wget https://mirror.ghproxy.com/https://raw.githubusercontent.com/zjccc1999/Cf-fdip/main/linux/zjccc.sh -O ~/zjccc.sh && chmod +x ~/zjccc.sh && bash ~/zjccc.sh` 51 | 52 | #### 安卓版叫做Pydroid3: 53 | 54 | - https://blog.qaiu.top/archives/pydroid3v72 55 | 56 | [网盘分享_Pydroid3v7.2汉化整合版主程序](https://lz.qaiu.top/ec/a2953816692ffcf47f9752dfced95b93KbU81gRfSx) 57 | 58 | [移动云空间网盘分享_Pydroid3权限插件](https://www.ecpan.cn/web/#/yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data=e7f868d1d5c5f6661de9f7a0e558c892efCU&isShare=1) 59 | 60 | 61 | 62 | - 将2-1py脚本和GeoLite2-Country.mmdb放在/storage/emulated/0/Android/data/ru.iiec.pydroid3/files/目录下 63 | 64 | - 在Windows系统下,可以通过安装**Git Bash**执行.sh,就是测速那里需要改一下。CloudflareSpeedTest 要替换 65 | 66 | 手机要使用Python安需要的库,到pydroid3自带的终端运行指令。 67 | 比如 pip install geoip2 68 | 69 | # python教程 70 | 安装Python 71 | 要安装os、geoip2、requests、zipfile、socket、re 和 tkinter,运行失败自己去下载库 72 | 73 | 推荐使用IDLE 74 | 75 | 右键没有的话使用文件夹中的reg更改注册表 76 | 77 | 自己右键编辑去替换目录 这是我的目录D:\\PY\\pythonw.exe 78 | 79 | 4个1开头的是4种获取IP的方法,推荐1-1 80 | 81 | 剩下的名字都有说明不多解释了。 82 | 83 | # https://github.com/P3TERX/GeoLite.mmdb 84 | 85 | 有时间替换下这个,这个是识别地区用的 86 | 87 | # 图片 88 | 89 | [文件目录](https://github.com/zjccc1999/Cf-fdip/blob/main/%E5%9B%BE%E7%89%87/%E6%96%87%E4%BB%B6%E7%9B%AE%E5%BD%95.jpg) 90 | 91 | [Termux](https://github.com/zjccc1999/Cf-fdip/blob/main/%E5%9B%BE%E7%89%87/Termux.jpg) 92 | 93 | [Pydroid 3](https://github.com/zjccc1999/Cf-fdip/blob/main/%E5%9B%BE%E7%89%87/Python.jpg) 94 | 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /linux.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/linux.zip -------------------------------------------------------------------------------- /linux/CloudflareST: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/linux/CloudflareST -------------------------------------------------------------------------------- /linux/GeoLite2-Country.mmdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/linux/GeoLite2-Country.mmdb -------------------------------------------------------------------------------- /linux/zjccc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | # 欢迎语 5 | echo "一起白嫖吧!" 6 | # 获取当前工作目录 7 | current_dir=$(pwd) 8 | 9 | # 定义检查网络连通性的函数 10 | check_network_access() { 11 | url=\$1 12 | if curl --output /dev/null --silent --head --fail "$url"; then 13 | return 0 14 | else 15 | return 1 16 | fi 17 | } 18 | 19 | # 第一个功能:https://zip.baipiao.eu.org下载文件并处理 20 | function1() { 21 | cd "$(dirname "$0")" 22 | 23 | # 清除之前的 txt 目录 24 | rm -rf txt > /dev/null 2>&1 25 | 26 | # 询问用户是否更新本地 txt.zip 数据 27 | read -p "是否更新本地 txt.zip 数据? (0不更新、1更新(默认)): " updatezip 28 | if [ -z "$updatezip" ]; then 29 | updatezip=1 30 | fi 31 | 32 | # 如果用户选择更新,则从指定的 URL 下载数据文件 33 | if [[ $updatezip -eq 1 ]]; then 34 | echo "正在从 https://zip.baipiao.eu.org 下载数据文件" 35 | curl -# https://zip.baipiao.eu.org -o txt.zip 36 | if [ $? -ne 0 ]; then 37 | echo "下载失败,请检查网络连接或手动下载并放置在本目录" 38 | exit 1 39 | fi 40 | echo "下载完成" 41 | fi 42 | 43 | # 下载完成后尝试解压 44 | if [[ -e "txt.zip" ]]; then 45 | echo "正在解压下载的文件" 46 | unzip -o txt.zip -d txt || echo "解压失败,请检查文件是否损坏或权限不足。" 47 | echo "解压成功,删除原压缩包" 48 | rm txt.zip 49 | else 50 | echo "下载文件不存在,无法解压" 51 | fi 52 | 53 | # 合并 txt 目录中的所有文本文件,并去除重复的IP地址 54 | if [[ -d "txt" ]]; then 55 | echo "正在合并 txt 目录中的所有文本文件,并去除重复的IP地址" 56 | cat txt/*.txt | awk '!seen[$0]++' > zipbaipiao.txt 57 | echo "合并成功,文件已保存为 zipbaipiao.txt" 58 | else 59 | echo "txt 目录不存在,无法合并文件" 60 | fi 61 | 62 | # 移动文件 63 | if [[ -e "zipbaipiao.txt" ]]; then 64 | echo "正在移动文件" 65 | mv zipbaipiao.txt "$script_dir/" || echo "移动失败,请检查目标目录是否存在并具有足够的权限。" 66 | echo "移动成功" 67 | else 68 | echo "文件不存在,无法移动" 69 | fi 70 | } 71 | # 第二个功能:获取IP地址并追加到文件 72 | function2() { 73 | url="https://ipdb.api.030101.xyz/?type=proxy" 74 | file_path="ipdb.txt" 75 | 76 | ip_addresses=$(curl -s "$url" | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b") 77 | 78 | if [ -f "$file_path" ]; then 79 | echo "文件已存在,追加新的IP地址到文件中..." 80 | else 81 | echo "文件不存在,创建文件..." 82 | touch "$file_path" 83 | fi 84 | 85 | for ip in $ip_addresses; do 86 | if ! grep -q "$ip" "$file_path"; then 87 | echo "$ip" >> "$file_path" 88 | echo "追加新的IP地址到文件中: $ip" 89 | else 90 | echo "IP地址已存在,跳过: $ip" 91 | fi 92 | done 93 | 94 | echo "IP地址已更新到 $file_path 文件。" 95 | } 96 | 97 | # 第三个功能:查询反代域名的IPv4地址并追加到文件 98 | function3() { 99 | # 第三个脚本内容 100 | # 函数用于检查是否为IPv4地址 101 | is_ipv4() { 102 | address=\$1 103 | if [[ $address =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then 104 | return 0 105 | else 106 | return 1 107 | fi 108 | } 109 | 110 | # 要查询的域名列表,每个域名占据一行 111 | domains=' 112 | acjp2.cloudflarest.link 113 | bestproxy.onecf.eu.org 114 | acsg.cloudflarest.link 115 | acsg3.cloudflarest.link 116 | acjp.cloudflarest.link 117 | cdn.shanggan.pp.ua 118 | best.cdn.sqeven.cn 119 | proxy.xxxxxxxx.tk 120 | jp.anxray.top 121 | jpcdn.raises.top 122 | achk2.cloudflarest.link 123 | yx.blessbai.tech 124 | qq.achen.link 125 | cf.akaagiao.link 126 | jp.anxray.top.cdn.cloudflare.net 127 | cf.ts7575.top 128 | yx.blessbai.tech 129 | bestproxy.wcccc.fun 130 | www.xfltd.top 131 | 1.achen.link 132 | cf.flyff.eu.org 133 | ak.永遠的神b.link 134 | ' 135 | 136 | # 将字符串按换行符分割成数组 137 | IFS=$'\n' read -r -d '' -a domains_array <<< "$domains" 138 | 139 | # 打开文件准备追加新的IPv4地址 140 | file_path="FDYMIP.txt" 141 | 142 | # 读取已有的IP地址 143 | existing_ips=() 144 | if [ -f "$file_path" ]; then 145 | while IFS= read -r line; do 146 | existing_ips+=("$line") 147 | done < "$file_path" 148 | fi 149 | 150 | # 打开文件准备追加新的IPv4地址,如果文件不存在则创建 151 | for domain in "${domains_array[@]}"; do 152 | result=$(dig +short "$domain" | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}') 153 | ips=($(echo "$result" | tr ' ' '\n' | sort -u)) 154 | 155 | for ip in "${ips[@]}"; do 156 | if ! [[ " ${existing_ips[@]} " =~ " $ip " ]]; then 157 | echo "$ip" >> "$file_path" 158 | echo "$domain - $ip added to file" 159 | fi 160 | done 161 | done 162 | 163 | echo "新的IPv4地址追加完成。" 164 | 165 | } 166 | 167 | # 第四个功能:查询官方域名的IPv4地址并追加到文件 168 | function4() { 169 | # 第四个脚本内容 170 | # 函数用于检查是否为IPv4地址 171 | is_ipv4() { 172 | address=\$1 173 | if [[ $address =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then 174 | return 0 175 | else 176 | return 1 177 | fi 178 | } 179 | 180 | # 要查询的域名列表,每个域名占据一行 181 | domains=' 182 | icook.hk 183 | ip.sb 184 | japan.com 185 | skk.moe 186 | www.visa.com 187 | www.visa.co.jp 188 | www.visakorea.com 189 | www.gco.gov.qa 190 | www.csgo.com 191 | www.whatismyip.com 192 | gamer.com.tw 193 | steamdb.info 194 | toy-people.com 195 | silkbook.com 196 | cdn.anycast.eu.org 197 | shopify.com 198 | www.visa.com.tw 199 | time.is 200 | www.hugedomains.com 201 | www.visa.com.sg 202 | www.whoer.net 203 | www.visa.com.hk 204 | malaysia.com 205 | www.ipget.net 206 | icook.tw 207 | www.gov.ua 208 | www.udacity.com 209 | www.shopify.com 210 | singapore.com 211 | russia.com 212 | www.4chan.org 213 | www.glassdoor.com 214 | xn--b6gac.eu.org 215 | www.digitalocean.com 216 | www.udemy.com 217 | cdn-all.xn--b6gac.eu.org 218 | dnschecker.org 219 | tasteatlas.com 220 | pixiv.net 221 | comicabc.com 222 | cfip.xxxxxxxx.tk 223 | ' 224 | 225 | # 将字符串按换行符分割成数组 226 | IFS=$'\n' read -r -d '' -a domains_array <<< "$domains" 227 | 228 | # 打开文件准备追加新的IPv4地址 229 | file_path="GFYMIP.txt" 230 | 231 | # 读取已有的IP地址 232 | existing_ips=() 233 | if [ -f "$file_path" ]; then 234 | while IFS= read -r line; do 235 | existing_ips+=("$line") 236 | done < "$file_path" 237 | fi 238 | 239 | # 打开文件准备追加新的IPv4地址,如果文件不存在则创建 240 | for domain in "${domains_array[@]}"; do 241 | result=$(dig +short "$domain" | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}') 242 | ips=($(echo "$result" | tr ' ' '\n' | sort -u)) 243 | 244 | for ip in "${ips[@]}"; do 245 | if ! [[ " ${existing_ips[@]} " =~ " $ip " ]]; then 246 | echo "$ip" >> "$file_path" 247 | echo "$domain - $ip added to file" 248 | fi 249 | done 250 | done 251 | 252 | echo "新的IPv4地址追加完成。" 253 | } 254 | 255 | # 第五个功能:API识别国家地区 256 | function5() { 257 | # 函数5的内容 258 | # Function to process IP addresses and save them to country-specific files 259 | process_ip() { 260 | local ip=$1 261 | local file=$2 262 | local api=$3 263 | local country 264 | 265 | # Check if IP address has already been processed 266 | if grep -q "$ip" "${file%%.*}/processed_ips.txt"; then 267 | echo "IP地址 $ip 已经处理过,跳过处理。" 268 | return 269 | fi 270 | 271 | # Query IP address information using ipinfo.io 272 | if [ "$api" == "ipinfo" ]; then 273 | country=$(curl -s https://ipinfo.io/$ip/country) 274 | # Query IP address information using ipapi.com 275 | else 276 | # Get country code from ipapi.com response and convert it to abbreviation 277 | country_code=$(curl -s "https://ipapi.com/ip_api.php?ip=$ip" | jq -r '.country_code') 278 | country=$(curl -s "https://restcountries.com/v3.1/alpha?codes=$country_code" | jq -r '.[0].cca2') 279 | fi 280 | 281 | # Check if country information is valid 282 | if [ -z "$country" ]; then 283 | echo "查询 $ip 失败,尝试使用另一个API进行查询。" 284 | process_ip "$ip" "$file" "ipapi" # Try the other API 285 | return 286 | fi 287 | 288 | echo "IP地址: $ip, 国家 ($api): $country" 289 | echo $ip >> "${file%%.*}/processed_ips.txt" 290 | echo $ip >> "${file%%.*}/$country.txt" 291 | } 292 | 293 | # Remove duplicate IP addresses from a file 294 | remove_duplicates() { 295 | local file=$1 296 | awk '!seen[$0]++' "$file" > "$file.tmp" && mv "$file.tmp" "$file" 297 | } 298 | 299 | # Main function to process IP addresses 300 | process_ip_concurrently() { 301 | local file=$1 302 | local api1="ipinfo" 303 | local api2="ipapi" 304 | local current_api=$api1 305 | local ips=( $(<"$file") ) 306 | local ip 307 | local index=0 308 | 309 | mkdir -p "${file%%.*}" 310 | touch "${file%%.*}/processed_ips.txt" 311 | 312 | while [ $index -lt ${#ips[@]} ]; do 313 | for (( i=0; i<5 && index<${#ips[@]}; i++ )); do 314 | ip="${ips[index]}" 315 | 316 | # Check if IP address has already been processed 317 | if grep -q "$ip" "${file%%.*}/processed_ips.txt"; then 318 | echo "IP地址 $ip 已经处理过,跳过处理。" 319 | ((index++)) 320 | continue 321 | fi 322 | 323 | process_ip "$ip" "$file" "$current_api" & 324 | ((index++)) 325 | done 326 | 327 | if [ "$current_api" == "$api1" ]; then 328 | current_api=$api2 329 | else 330 | current_api=$api1 331 | fi 332 | done 333 | 334 | wait 335 | 336 | echo "查询完成!" 337 | 338 | # Remove processed_ips.txt file 339 | rm "${file%%.*}/processed_ips.txt" 340 | 341 | # Remove duplicate IP addresses 342 | remove_duplicates "$file" 343 | } 344 | 345 | # Main menu 346 | while true; do 347 | echo "----- 选择一个选项 -----" 348 | echo "1. 读取zipbaipiao.txt" 349 | echo "2. 读取ipdb.txt" 350 | echo "3. 读取FDYMIP.txt" 351 | echo "4. 读取GFYMIP.txt" 352 | echo "5. 退出" 353 | 354 | read -p "请选择一个选项: " choice 355 | 356 | case $choice in 357 | 1) 358 | file="zipbaipiao.txt" 359 | process_ip_concurrently "$file" 360 | ;; 361 | 2) 362 | file="ipdb.txt" 363 | process_ip_concurrently "$file" 364 | ;; 365 | 3) 366 | file="FDYMIP.txt" 367 | process_ip_concurrently "$file" 368 | ;; 369 | 4) 370 | file="GFYMIP.txt" 371 | process_ip_concurrently "$file" 372 | ;; 373 | 5) 374 | echo "退出程序." 375 | break 376 | ;; 377 | *) 378 | echo "无效选项,请重新选择." 379 | ;; 380 | esac 381 | done 382 | 383 | } 384 | 385 | # 第六个功能 386 | function6() { 387 | # Function to process IP addresses and save them to country-specific files 388 | process_ip() { 389 | local ip=$1 390 | local file=$2 391 | local country 392 | 393 | # Check if IP address has already been processed 394 | if grep -q "$ip" "${file%%.*}/processed_ips.txt"; then 395 | echo "IP地址 $ip 已经处理过,跳过处理。" 396 | return 397 | fi 398 | 399 | # Query IP address information using GeoLite2-Country.mmdb 400 | country=$(mmdblookup --file ~/GeoLite2-Country.mmdb --ip "$ip" country iso_code) 401 | 402 | # Extract country code from the response 403 | country=$(echo "$country" | sed -n 's/^.*"\(.*\)".*$/\1/p') 404 | 405 | # Check if country information is valid 406 | if [ -z "$country" ]; then 407 | echo "查询 $ip 失败,跳过处理。" 408 | return 409 | fi 410 | 411 | echo "IP地址: $ip, 国家: $country" 412 | echo "$ip" >> "${file%%.*}/processed_ips.txt" 413 | echo "$ip" >> "${file%%.*}/$country.txt" 414 | } 415 | 416 | # Remove duplicate IP addresses from a file 417 | remove_duplicates() { 418 | local file=$1 419 | awk '!seen[$0]++' "$file" > "$file.tmp" && mv "$file.tmp" "$file" 420 | } 421 | 422 | # Main function to process IP addresses 423 | process_ip_concurrently() { 424 | local file=$1 425 | local ips=( $(<"$file") ) 426 | local ip 427 | local index=0 428 | 429 | mkdir -p "${file%%.*}" 430 | touch "${file%%.*}/processed_ips.txt" 431 | 432 | while [ $index -lt ${#ips[@]} ]; do 433 | for (( i=0; i<5 && index<${#ips[@]}; i++ )); do 434 | ip="${ips[index]}" 435 | 436 | # Check if IP address has already been processed 437 | if grep -q "$ip" "${file%%.*}/processed_ips.txt"; then 438 | echo "IP地址 $ip 已经处理过,跳过处理。" 439 | ((index++)) 440 | continue 441 | fi 442 | 443 | process_ip "$ip" "$file" & 444 | ((index++)) 445 | done 446 | done 447 | 448 | wait 449 | 450 | echo "查询完成!" 451 | 452 | # Remove processed_ips.txt file 453 | rm "${file%%.*}/processed_ips.txt" 454 | 455 | # Remove duplicate IP addresses 456 | remove_duplicates "$file" 457 | } 458 | 459 | # Main menu 460 | while true; do 461 | echo "----- 选择一个选项 -----" 462 | echo "1. 读取zipbaipiao.txt" 463 | echo "2. 读取ipdb.txt" 464 | echo "3. 读取FDYMIP.txt" 465 | echo "4. 读取GFYMIP.txt" 466 | echo "5. 退出" 467 | 468 | read -p "请选择一个选项: " choice 469 | 470 | case $choice in 471 | 1) 472 | file="zipbaipiao.txt" 473 | process_ip_concurrently "$file" 474 | ;; 475 | 2) 476 | file="ipdb.txt" 477 | process_ip_concurrently "$file" 478 | ;; 479 | 3) 480 | file="FDYMIP.txt" 481 | process_ip_concurrently "$file" 482 | ;; 483 | 4) 484 | file="GFYMIP.txt" 485 | process_ip_concurrently "$file" 486 | ;; 487 | 5) 488 | echo "退出程序." 489 | break 490 | ;; 491 | *) 492 | echo "无效选项,请重新选择." 493 | ;; 494 | esac 495 | done 496 | } 497 | # 第七个功能:测速 498 | function7() { 499 | # 函数7的内容 500 | #!/bin/bash 501 | 502 | # 清空屏幕 503 | clear 504 | 505 | echo "欢迎使用越测越开心脚本!" 506 | echo "请选择要测试的协议:" 507 | echo "1. HTTP" 508 | echo "2. HTTPS" 509 | 510 | read -p "请输入选项: " choice 511 | 512 | case $choice in 513 | 1) 514 | echo "您选择了 HTTP 协议" 515 | http_ports=("80" "8080" "8880" "2052" "2082" "2086" "2095") 516 | ;; 517 | 2) 518 | echo "您选择了 HTTPS 协议" 519 | https_ports=("443" "2053" "2083" "2087" "2096" "8443") 520 | ;; 521 | *) 522 | echo "无效选项,退出脚本" 523 | exit 1 524 | ;; 525 | esac 526 | 527 | # 选择端口 528 | if [ $choice -eq 1 ]; then 529 | echo "请选择一个端口进行测试:" 530 | select port in "${http_ports[@]}"; do 531 | if [[ " ${http_ports[@]} " =~ " $port " ]]; then 532 | echo "您选择的端口是: $port" 533 | break 534 | else 535 | echo "无效的端口,请重新选择" 536 | fi 537 | done 538 | else 539 | echo "请选择一个端口进行测试:" 540 | select port in "${https_ports[@]}"; do 541 | if [[ " ${https_ports[@]} " =~ " $port " ]]; then 542 | echo "您选择的端口是: $port" 543 | break 544 | else 545 | echo "无效的端口,请重新选择" 546 | fi 547 | done 548 | fi 549 | 550 | # 选择文本文件 551 | echo "请选择一个文本文件进行测试:" 552 | text_files=("HK.txt" "KR.txt" "SG.txt" "GFYMIP.txt" "TW.txt" "AE.txt" "US.txt" "DE.txt" "JP.txt" "CA.txt" "CH.txt" "GB.txt" "IN.txt" "IT.txt" "NL.txt" "BG.txt" "FR.txt" "DK.txt" "PH.txt" "SE.txt" "CN.txt" "ID.txt") 553 | select text_file in "${text_files[@]}"; do 554 | if [[ " ${text_files[@]} " =~ " $text_file " ]]; then 555 | echo "您选择的文本文件是: $text_file" 556 | break 557 | else 558 | echo "无效的文本文件,请重新选择" 559 | fi 560 | done 561 | 562 | # 查找并合并同一目录及子目录下的 $text_file 563 | merged_file="${text_file}" 564 | if [ "$text_file" != "GFYMIP.txt" ]; then 565 | find . -type f -name "$text_file" -exec cat {} + > "$merged_file" 566 | fi 567 | 568 | # 去除重复 IP 569 | awk '!seen[$0]++' "$merged_file" > "$merged_file.unique" 570 | mv "$merged_file.unique" "$merged_file" 571 | 572 | # 复制合并后的文件到脚本根目录 573 | cp "$merged_file" . 574 | echo "文件已复制到脚本目录:$merged_file" 575 | 576 | 577 | # 执行测试命令 578 | echo "开始执行测试..." 579 | if [ $choice -eq 1 ]; then 580 | ./CloudflareST -tp $port -f $text_file -n 200 -dn 10 -sl 10 -tl 400 -url http://cs.notls.zjccc.onflashdrive.app/200m -dd 581 | else 582 | ./CloudflareST -tp $port -f $text_file -n 200 -dn 10 -sl 10 -tl 400 -url https://cs.notls.zjccc.onflashdrive.app/200m -dd 583 | fi 584 | 585 | echo "测试完成!" 586 | 587 | } 588 | 589 | # 第八个功能:转换成txt 590 | function8() { 591 | # 函数8的内容 592 | # 提取IP地址 593 | ips=$(cut -d',' -f1 result.csv | tail -n +2) 594 | 595 | # 用户自定义字符 596 | read -p "请输入自定义字符: " custom_char 597 | 598 | # 获取当前时间 599 | current_time=$(date +"%Y-%m-%d_%H-%M-%S") 600 | 601 | # 生成带时间戳的文件名 602 | file_name="${current_time}_GS.txt" 603 | 604 | # 定义计数器 605 | count=1 606 | 607 | # 将内容写入带时间戳的文件 608 | for ip in $ips 609 | do 610 | echo "$ip:${custom_char}${count}" >> "$file_name" 611 | ((count++)) 612 | done 613 | 614 | echo "已生成带时间戳的文件: $file_name" 615 | 616 | } 617 | 618 | # 主菜单 619 | while true; do 620 | echo "请选择一个选项,推荐用ipdb获取ip:" 621 | echo "1. zipbaipiao" 622 | echo "2. ipdb" 623 | echo "3. FDYM" 624 | echo "4. GFYM" 625 | echo "5. API识别国家" 626 | echo "6. 离线识别国家" 627 | echo "7. 测速" 628 | echo "8. 转txt" 629 | echo "9. 退出" 630 | 631 | read -p "选择: " choice 632 | 633 | case $choice in 634 | 1) function1 ;; 635 | 2) function2 ;; 636 | 3) function3 ;; 637 | 4) function4 ;; 638 | 5) function5 ;; 639 | 6) function6 ;; 640 | 7) function7 ;; 641 | 8) function8 ;; 642 | 9) echo "退出程序。再见!"; break ;; 643 | *) echo "无效的选择。请重新选择一个有效的选项。" ;; 644 | esac 645 | done 646 | -------------------------------------------------------------------------------- /linux/测速指令后面加了 -dd感觉没必要测速,测个延迟就行了,能通就行.txt: -------------------------------------------------------------------------------- 1 | 测速指令后面加了 -dd, 2 | 感觉没必要测速,测个延迟就行了,能通就行 -------------------------------------------------------------------------------- /图片/Python.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/图片/Python.jpg -------------------------------------------------------------------------------- /图片/Termux.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/图片/Termux.jpg -------------------------------------------------------------------------------- /图片/文件目录.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/图片/文件目录.jpg -------------------------------------------------------------------------------- /安卓手机.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/安卓手机.zip -------------------------------------------------------------------------------- /安卓手机/2-1 识别国家地区且整合.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | import geoip2.database 4 | import tkinter as tk 5 | from tkinter import filedialog 6 | 7 | def process_file(file_path): 8 | if os.path.exists(file_path): 9 | process_files(file_path) 10 | print(f"处理文件 {os.path.basename(file_path)} 完成!") 11 | else: 12 | print(f"文件 {os.path.basename(file_path)} 不存在!") 13 | 14 | def process_files(file_path): 15 | with open(file_path, 'r') as file: 16 | data = file.read() 17 | # 使用正则表达式查找IP地址并去重处理 18 | ip_addresses = list(set(re.findall(r'\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b', data))) # 去重处理 19 | 20 | reader = geoip2.database.Reader('GeoLite2-Country.mmdb') 21 | country_ip_map = {} 22 | for ip in ip_addresses: 23 | try: 24 | response = reader.country(ip) 25 | country_code = response.country.iso_code 26 | if country_code not in country_ip_map: 27 | country_ip_map[country_code] = [] 28 | country_ip_map[country_code].append(ip) 29 | except: 30 | pass 31 | 32 | folder_name = os.path.splitext(os.path.basename(file_path))[0] 33 | output_folder = os.path.join(os.path.dirname(file_path), folder_name) 34 | os.makedirs(output_folder, exist_ok=True) 35 | 36 | for country_code, ips in country_ip_map.items(): 37 | output_filename = os.path.join(output_folder, f'{country_code}.txt') 38 | with open(output_filename, 'a') as output_file: 39 | for ip in ips: 40 | output_file.write(f'{ip}\n') 41 | 42 | reader.close() 43 | 44 | # 创建 Tkinter 窗口 45 | root = tk.Tk() 46 | root.title("IP 地址处理程序") 47 | 48 | # 创建处理文件按钮 49 | file_names = ['GFYMIP.txt', 'ipdb.txt', 'zipbaipiao.txt', 'FDYMIP.txt'] 50 | 51 | # 创建按钮处理指定文件 52 | for file_name in file_names: 53 | button = tk.Button(root, text=f"处理 {file_name}", command=lambda name=file_name: process_file(os.path.join(os.getcwd(), name))) 54 | button.pack(pady=10) 55 | 56 | # 创建按钮让用户自由选择文件 57 | def select_file(): 58 | file_path = filedialog.askopenfilename(filetypes=[('Text files', '*.txt')]) 59 | if file_path: 60 | process_file(file_path) 61 | 62 | select_file_button = tk.Button(root, text="自由选择文件", command=select_file) 63 | select_file_button.pack(pady=10) 64 | 65 | root.mainloop() 66 | -------------------------------------------------------------------------------- /安卓手机/FDYMIP.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | is_ipv4() { 4 | address="$1" 5 | if echo "$address" | grep -Eq '^([0-9]{1,3}\.){3}[0-9]{1,3}$'; then 6 | return 0 7 | else 8 | return 1 9 | fi 10 | } 11 | 12 | # 要查询的域名列表,每个域名占据一行 13 | domains=" 14 | acjp2.cloudflarest.link 15 | bestproxy.onecf.eu.org 16 | acsg.cloudflarest.link 17 | acsg3.cloudflarest.link 18 | acjp.cloudflarest.link 19 | cdn.shanggan.pp.ua 20 | best.cdn.sqeven.cn 21 | proxy.xxxxxxxx.tk 22 | jp.anxray.top 23 | jpcdn.raises.top 24 | achk2.cloudflarest.link 25 | yx.blessbai.tech 26 | qq.achen.link 27 | cf.akaagiao.link 28 | jp.anxray.top.cdn.cloudflare.net 29 | cf.ts7575.top 30 | yx.blessbai.tech 31 | bestproxy.wcccc.fun 32 | www.xfltd.top 33 | 1.achen.link 34 | cf.flyff.eu.org 35 | ak.永遠的神b.link 36 | " 37 | 38 | # 将字符串按换行符分割成数组 39 | IFS=$'\n' read -r -d '' -a domains_array <<< "$domains" 40 | 41 | # 打开文件准备追加新的IPv4地址 42 | file_path="FDYMIP.txt" 43 | 44 | # 读取已有的IP地址 45 | existing_ips=() 46 | if [ -f "$file_path" ]; then 47 | while IFS= read -r line; do 48 | existing_ips+=("$line") 49 | done < "$file_path" 50 | fi 51 | 52 | # 打开文件准备追加新的IPv4地址,如果文件不存在则创建 53 | for domain in "${domains_array[@]}"; do 54 | result=$(nslookup -querytype=A "$domain" | awk '/^Address: / { print $2 }') 55 | ips=($(echo "$result" | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}')) 56 | 57 | for ip in "${ips[@]}"; do 58 | if ! [[ " ${existing_ips[@]} " =~ " $ip " ]]; then 59 | echo "$ip" 60 | existing_ips+=("$ip") 61 | fi 62 | done 63 | done >> "$file_path" 64 | 65 | echo "新的IPv4地址追加完成。" 66 | -------------------------------------------------------------------------------- /安卓手机/GFYMIP.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | is_ipv4() { 4 | local address="$1" 5 | if [[ $address =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then 6 | return 0 7 | else 8 | return 1 9 | fi 10 | } 11 | 12 | is_ipv6() { 13 | local address="$1" 14 | if [[ $address =~ ^[0-9a-fA-F:]+$ ]]; then 15 | return 0 16 | else 17 | return 1 18 | fi 19 | } 20 | 21 | # 要查询的域名列表,每个域名占据一行 22 | domains=' 23 | icook.hk 24 | ip.sb 25 | japan.com 26 | skk.moe 27 | www.visa.com 28 | www.visa.co.jp 29 | www.visakorea.com 30 | www.gco.gov.qa 31 | www.csgo.com 32 | www.whatismyip.com 33 | gamer.com.tw 34 | steamdb.info 35 | toy-people.com 36 | silkbook.com 37 | cdn.anycast.eu.org 38 | shopify.com 39 | www.visa.com.tw 40 | time.is 41 | www.hugedomains.com 42 | www.visa.com.sg 43 | www.whoer.net 44 | www.visa.com.hk 45 | malaysia.com 46 | www.ipget.net 47 | icook.tw 48 | www.gov.ua 49 | www.udacity.com 50 | www.shopify.com 51 | singapore.com 52 | russia.com 53 | www.4chan.org 54 | www.glassdoor.com 55 | xn--b6gac.eu.org 56 | www.digitalocean.com 57 | www.udemy.com 58 | cdn-all.xn--b6gac.eu.org 59 | dnschecker.org 60 | tasteatlas.com 61 | pixiv.net 62 | comicabc.com 63 | cfip.xxxxxxxx.tk 64 | ' 65 | 66 | # 将字符串按换行符分割成数组 67 | IFS=$'\n' read -r -d '' -a domains_array <<< "$domains" 68 | 69 | # 打开文件准备追加新的IPv4和IPv6地址,如果文件不存在则创建 70 | file_path="GFYMIP.txt" 71 | existing_ips=() 72 | 73 | if [ -f "$file_path" ]; then 74 | while IFS= read -r line; do 75 | existing_ips+=("$line") 76 | done < "$file_path" 77 | fi 78 | 79 | # 查询域名并将新的IPv4和IPv6地址追加到文件 80 | for domain in "${domains_array[@]}"; do 81 | result=$(nslookup -querytype=A "$domain" | awk '/^Address: / { print $2 }') 82 | ipv4s=($(echo "$result" | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}')) 83 | 84 | for ip in "${ipv4s[@]}"; do 85 | if ! [[ " ${existing_ips[@]} " =~ " $ip " ]]; then 86 | echo "$ip" >> "$file_path" 87 | echo "$domain - $ip (IPv4) added to file" 88 | fi 89 | done 90 | 91 | result=$(nslookup -querytype=AAAA "$domain" | awk '/^Address: / { print $2 }') 92 | ipv6s=($(echo "$result" | grep -E '([0-9a-fA-F:]+)' | grep -v '^$')) 93 | 94 | for ip in "${ipv6s[@]}"; do 95 | if ! [[ " ${existing_ips[@]} " =~ " $ip " ]]; then 96 | echo "$ip" >> "$file_path" 97 | echo "$domain - $ip (IPv6) added to file" 98 | fi 99 | done 100 | done 101 | 102 | echo "新的IPv4和IPv6地址追加完成。" 103 | -------------------------------------------------------------------------------- /安卓手机/GeoLite2-Country.mmdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/安卓手机/GeoLite2-Country.mmdb -------------------------------------------------------------------------------- /安卓手机/guojia.sh: -------------------------------------------------------------------------------- 1 | # Function to process IP addresses and save them to country-specific files 2 | process_ip() { 3 | local ip=$1 4 | local file=$2 5 | local country 6 | 7 | # Check if IP address has already been processed 8 | if grep -q "$ip" "${file%%.*}/processed_ips.txt"; then 9 | echo "IP地址 $ip 已经处理过,跳过处理。" 10 | return 11 | fi 12 | 13 | # Query IP address information using GeoLite2-Country.mmdb 14 | country=$(mmdblookup --file ~/GeoLite2-Country.mmdb --ip "$ip" country iso_code) 15 | 16 | # Extract country code from the response 17 | country=$(echo "$country" | sed -n 's/^.*"\(.*\)".*$/\1/p') 18 | 19 | # Check if country information is valid 20 | if [ -z "$country" ]; then 21 | echo "查询 $ip 失败,跳过处理。" 22 | return 23 | fi 24 | 25 | echo "IP地址: $ip, 国家: $country" 26 | echo "$ip" >> "${file%%.*}/processed_ips.txt" 27 | echo "$ip" >> "${file%%.*}/$country.txt" 28 | } 29 | 30 | # Remove duplicate IP addresses from a file 31 | remove_duplicates() { 32 | local file=$1 33 | awk '!seen[$0]++' "$file" > "$file.tmp" && mv "$file.tmp" "$file" 34 | } 35 | 36 | # Main function to process IP addresses 37 | process_ip_concurrently() { 38 | local file=$1 39 | local ips=( $(<"$file") ) 40 | local ip 41 | local index=0 42 | 43 | mkdir -p "${file%%.*}" 44 | touch "${file%%.*}/processed_ips.txt" 45 | 46 | while [ $index -lt ${#ips[@]} ]; do 47 | for (( i=0; i<5 && index<${#ips[@]}; i++ )); do 48 | ip="${ips[index]}" 49 | 50 | # Check if IP address has already been processed 51 | if grep -q "$ip" "${file%%.*}/processed_ips.txt"; then 52 | echo "IP地址 $ip 已经处理过,跳过处理。" 53 | ((index++)) 54 | continue 55 | fi 56 | 57 | process_ip "$ip" "$file" & 58 | ((index++)) 59 | done 60 | done 61 | 62 | wait 63 | 64 | echo "查询完成!" 65 | 66 | # Remove processed_ips.txt file 67 | rm "${file%%.*}/processed_ips.txt" 68 | 69 | # Remove duplicate IP addresses 70 | remove_duplicates "$file" 71 | } 72 | 73 | # Main menu 74 | while true; do 75 | echo "----- 选择一个选项 -----" 76 | echo "1. 读取FDYMIP.txt" 77 | echo "2. 读取GFYMIP.txt" 78 | echo "3. 读取ipdb.txt" 79 | echo "4. 读取zipbaipiao.txt" 80 | echo "5. 退出" 81 | 82 | read -p "请选择一个选项: " choice 83 | 84 | case $choice in 85 | 1) 86 | file="FDYMIP.txt" 87 | process_ip_concurrently "$file" 88 | ;; 89 | 2) 90 | file="GFYMIP.txt" 91 | process_ip_concurrently "$file" 92 | ;; 93 | 3) 94 | file="ipdb.txt" 95 | process_ip_concurrently "$file" 96 | ;; 97 | 4) 98 | file="zipbaipiao.txt" 99 | process_ip_concurrently "$file" 100 | ;; 101 | 5) 102 | echo "退出程序." 103 | break 104 | ;; 105 | *) 106 | echo "无效选项,请重新选择." 107 | ;; 108 | esac 109 | done 110 | -------------------------------------------------------------------------------- /安卓手机/zjccc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | # 欢迎语 5 | echo "一起白嫖吧!" 6 | # 获取当前工作目录 7 | current_dir=$(pwd) 8 | 9 | # 定义检查网络连通性的函数 10 | check_network_access() { 11 | url=\$1 12 | if curl --output /dev/null --silent --head --fail "$url"; then 13 | return 0 14 | else 15 | return 1 16 | fi 17 | } 18 | 19 | # 第一个功能:https://zip.baipiao.eu.org下载文件并处理 20 | function1() { 21 | cd "$(dirname "$0")" 22 | 23 | # 清除之前的 txt 目录 24 | rm -rf txt > /dev/null 2>&1 25 | 26 | # 询问用户是否更新本地 txt.zip 数据 27 | read -p "是否更新本地 txt.zip 数据? (0不更新、1更新(默认)): " updatezip 28 | if [ -z "$updatezip" ]; then 29 | updatezip=1 30 | fi 31 | 32 | # 如果用户选择更新,则从指定的 URL 下载数据文件 33 | if [[ $updatezip -eq 1 ]]; then 34 | echo "正在从 https://zip.baipiao.eu.org 下载数据文件" 35 | curl -# https://zip.baipiao.eu.org -o txt.zip 36 | if [ $? -ne 0 ]; then 37 | echo "下载失败,请检查网络连接或手动下载并放置在本目录" 38 | exit 1 39 | fi 40 | echo "下载完成" 41 | fi 42 | 43 | # 下载完成后尝试解压 44 | if [[ -e "txt.zip" ]]; then 45 | echo "正在解压下载的文件" 46 | unzip -o txt.zip -d txt || echo "解压失败,请检查文件是否损坏或权限不足。" 47 | echo "解压成功,删除原压缩包" 48 | rm txt.zip 49 | else 50 | echo "下载文件不存在,无法解压" 51 | fi 52 | 53 | # 合并 txt 目录中的所有文本文件,并去除重复的IP地址 54 | if [[ -d "txt" ]]; then 55 | echo "正在合并 txt 目录中的所有文本文件,并去除重复的IP地址" 56 | cat txt/*.txt | awk '!seen[$0]++' > zipbaipiao.txt 57 | echo "合并成功,文件已保存为 zipbaipiao.txt" 58 | else 59 | echo "txt 目录不存在,无法合并文件" 60 | fi 61 | 62 | # 移动文件 63 | if [[ -e "zipbaipiao.txt" ]]; then 64 | echo "正在移动文件" 65 | mv zipbaipiao.txt "$script_dir/" || echo "移动失败,请检查目标目录是否存在并具有足够的权限。" 66 | echo "移动成功" 67 | else 68 | echo "文件不存在,无法移动" 69 | fi 70 | } 71 | # 第二个功能:获取IP地址并追加到文件 72 | function2() { 73 | url="https://ipdb.api.030101.xyz/?type=proxy" 74 | file_path="ipdb.txt" 75 | 76 | ip_addresses=$(curl -s "$url" | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b") 77 | 78 | if [ -f "$file_path" ]; then 79 | echo "文件已存在,追加新的IP地址到文件中..." 80 | else 81 | echo "文件不存在,创建文件..." 82 | touch "$file_path" 83 | fi 84 | 85 | for ip in $ip_addresses; do 86 | if ! grep -q "$ip" "$file_path"; then 87 | echo "$ip" >> "$file_path" 88 | echo "追加新的IP地址到文件中: $ip" 89 | else 90 | echo "IP地址已存在,跳过: $ip" 91 | fi 92 | done 93 | 94 | echo "IP地址已更新到 $file_path 文件。" 95 | } 96 | 97 | # 第三个功能:查询反代域名的IPv4地址并追加到文件 98 | function3() { 99 | # 第三个脚本内容 100 | # 函数用于检查是否为IPv4地址 101 | is_ipv4() { 102 | address="$1" 103 | if echo "$address" | grep -Eq '^([0-9]{1,3}\.){3}[0-9]{1,3}$'; then 104 | return 0 105 | else 106 | return 1 107 | fi 108 | } 109 | 110 | # 要查询的域名列表,每个域名占据一行 111 | domains=" 112 | acjp2.cloudflarest.link 113 | bestproxy.onecf.eu.org 114 | acsg.cloudflarest.link 115 | acsg3.cloudflarest.link 116 | acjp.cloudflarest.link 117 | cdn.shanggan.pp.ua 118 | best.cdn.sqeven.cn 119 | proxy.xxxxxxxx.tk 120 | jp.anxray.top 121 | jpcdn.raises.top 122 | achk2.cloudflarest.link 123 | yx.blessbai.tech 124 | qq.achen.link 125 | cf.akaagiao.link 126 | jp.anxray.top.cdn.cloudflare.net 127 | cf.ts7575.top 128 | yx.blessbai.tech 129 | bestproxy.wcccc.fun 130 | www.xfltd.top 131 | 1.achen.link 132 | cf.flyff.eu.org 133 | ak.永遠的神b.link 134 | " 135 | 136 | # 将字符串按换行符分割成数组 137 | IFS=$'\n' read -r -d '' -a domains_array <<< "$domains" 138 | 139 | # 打开文件准备追加新的IPv4地址 140 | file_path="FDYMIP.txt" 141 | 142 | # 读取已有的IP地址 143 | existing_ips=() 144 | if [ -f "$file_path" ]; then 145 | while IFS= read -r line; do 146 | existing_ips+=("$line") 147 | done < "$file_path" 148 | fi 149 | 150 | # 打开文件准备追加新的IPv4地址,如果文件不存在则创建 151 | for domain in "${domains_array[@]}"; do 152 | result=$(nslookup -querytype=A "$domain" | awk '/^Address: / { print $2 }') 153 | ips=($(echo "$result" | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}')) 154 | 155 | for ip in "${ips[@]}"; do 156 | if ! [[ " ${existing_ips[@]} " =~ " $ip " ]]; then 157 | echo "$ip" 158 | existing_ips+=("$ip") 159 | fi 160 | done 161 | done >> "$file_path" 162 | 163 | echo "新的IPv4地址追加完成。" 164 | 165 | 166 | } 167 | 168 | # 第四个功能:查询官方域名的IPv4地址并追加到文件 169 | function4() { 170 | # 第四个脚本内容 171 | # 函数用于检查是否为IPv4地址 172 | is_ipv4() { 173 | local address="$1" 174 | if [[ $address =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then 175 | return 0 176 | else 177 | return 1 178 | fi 179 | } 180 | 181 | is_ipv6() { 182 | local address="$1" 183 | if [[ $address =~ ^[0-9a-fA-F:]+$ ]]; then 184 | return 0 185 | else 186 | return 1 187 | fi 188 | } 189 | 190 | # 要查询的域名列表,每个域名占据一行 191 | domains=' 192 | icook.hk 193 | ip.sb 194 | japan.com 195 | skk.moe 196 | www.visa.com 197 | www.visa.co.jp 198 | www.visakorea.com 199 | www.gco.gov.qa 200 | www.csgo.com 201 | www.whatismyip.com 202 | gamer.com.tw 203 | steamdb.info 204 | toy-people.com 205 | silkbook.com 206 | cdn.anycast.eu.org 207 | shopify.com 208 | www.visa.com.tw 209 | time.is 210 | www.hugedomains.com 211 | www.visa.com.sg 212 | www.whoer.net 213 | www.visa.com.hk 214 | malaysia.com 215 | www.ipget.net 216 | icook.tw 217 | www.gov.ua 218 | www.udacity.com 219 | www.shopify.com 220 | singapore.com 221 | russia.com 222 | www.4chan.org 223 | www.glassdoor.com 224 | xn--b6gac.eu.org 225 | www.digitalocean.com 226 | www.udemy.com 227 | cdn-all.xn--b6gac.eu.org 228 | dnschecker.org 229 | tasteatlas.com 230 | pixiv.net 231 | comicabc.com 232 | cfip.xxxxxxxx.tk 233 | ' 234 | 235 | # 将字符串按换行符分割成数组 236 | IFS=$'\n' read -r -d '' -a domains_array <<< "$domains" 237 | 238 | # 打开文件准备追加新的IPv4和IPv6地址,如果文件不存在则创建 239 | file_path="GFYMIP.txt" 240 | existing_ips=() 241 | 242 | if [ -f "$file_path" ]; then 243 | while IFS= read -r line; do 244 | existing_ips+=("$line") 245 | done < "$file_path" 246 | fi 247 | 248 | # 查询域名并将新的IPv4和IPv6地址追加到文件 249 | for domain in "${domains_array[@]}"; do 250 | result=$(nslookup -querytype=A "$domain" | awk '/^Address: / { print $2 }') 251 | ipv4s=($(echo "$result" | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}')) 252 | 253 | for ip in "${ipv4s[@]}"; do 254 | if ! [[ " ${existing_ips[@]} " =~ " $ip " ]]; then 255 | echo "$ip" >> "$file_path" 256 | echo "$domain - $ip (IPv4) added to file" 257 | fi 258 | done 259 | 260 | result=$(nslookup -querytype=AAAA "$domain" | awk '/^Address: / { print $2 }') 261 | ipv6s=($(echo "$result" | grep -E '([0-9a-fA-F:]+)' | grep -v '^$')) 262 | 263 | for ip in "${ipv6s[@]}"; do 264 | if ! [[ " ${existing_ips[@]} " =~ " $ip " ]]; then 265 | echo "$ip" >> "$file_path" 266 | echo "$domain - $ip (IPv6) added to file" 267 | fi 268 | done 269 | done 270 | 271 | echo "新的IPv4和IPv6地址追加完成。" 272 | } 273 | 274 | # 第五个功能:API识别国家地区 275 | function5() { 276 | # 函数5的内容 277 | # Function to process IP addresses and save them to country-specific files 278 | process_ip() { 279 | local ip=$1 280 | local file=$2 281 | local api=$3 282 | local country 283 | 284 | # Check if IP address has already been processed 285 | if grep -q "$ip" "${file%%.*}/processed_ips.txt"; then 286 | echo "IP地址 $ip 已经处理过,跳过处理。" 287 | return 288 | fi 289 | 290 | # Query IP address information using ipinfo.io 291 | if [ "$api" == "ipinfo" ]; then 292 | country=$(curl -s https://ipinfo.io/$ip/country) 293 | # Query IP address information using ipapi.com 294 | else 295 | # Get country code from ipapi.com response and convert it to abbreviation 296 | country_code=$(curl -s "https://ipapi.com/ip_api.php?ip=$ip" | jq -r '.country_code') 297 | country=$(curl -s "https://restcountries.com/v3.1/alpha?codes=$country_code" | jq -r '.[0].cca2') 298 | fi 299 | 300 | # Check if country information is valid 301 | if [ -z "$country" ]; then 302 | echo "查询 $ip 失败,尝试使用另一个API进行查询。" 303 | process_ip "$ip" "$file" "ipapi" # Try the other API 304 | return 305 | fi 306 | 307 | echo "IP地址: $ip, 国家 ($api): $country" 308 | echo $ip >> "${file%%.*}/processed_ips.txt" 309 | echo $ip >> "${file%%.*}/$country.txt" 310 | } 311 | 312 | # Remove duplicate IP addresses from a file 313 | remove_duplicates() { 314 | local file=$1 315 | awk '!seen[$0]++' "$file" > "$file.tmp" && mv "$file.tmp" "$file" 316 | } 317 | 318 | # Main function to process IP addresses 319 | process_ip_concurrently() { 320 | local file=$1 321 | local api1="ipinfo" 322 | local api2="ipapi" 323 | local current_api=$api1 324 | local ips=( $(<"$file") ) 325 | local ip 326 | local index=0 327 | 328 | mkdir -p "${file%%.*}" 329 | touch "${file%%.*}/processed_ips.txt" 330 | 331 | while [ $index -lt ${#ips[@]} ]; do 332 | for (( i=0; i<5 && index<${#ips[@]}; i++ )); do 333 | ip="${ips[index]}" 334 | 335 | # Check if IP address has already been processed 336 | if grep -q "$ip" "${file%%.*}/processed_ips.txt"; then 337 | echo "IP地址 $ip 已经处理过,跳过处理。" 338 | ((index++)) 339 | continue 340 | fi 341 | 342 | process_ip "$ip" "$file" "$current_api" & 343 | ((index++)) 344 | done 345 | 346 | if [ "$current_api" == "$api1" ]; then 347 | current_api=$api2 348 | else 349 | current_api=$api1 350 | fi 351 | done 352 | 353 | wait 354 | 355 | echo "查询完成!" 356 | 357 | # Remove processed_ips.txt file 358 | rm "${file%%.*}/processed_ips.txt" 359 | 360 | # Remove duplicate IP addresses 361 | remove_duplicates "$file" 362 | } 363 | 364 | # Main menu 365 | while true; do 366 | echo "----- 选择一个选项 -----" 367 | echo "1. 读取zipbaipiao.txt" 368 | echo "2. 读取ipdb.txt" 369 | echo "3. 读取FDYMIP.txt" 370 | echo "4. 读取GFYMIP.txt" 371 | echo "5. 退出" 372 | 373 | read -p "请选择一个选项: " choice 374 | 375 | case $choice in 376 | 1) 377 | file="zipbaipiao.txt" 378 | process_ip_concurrently "$file" 379 | ;; 380 | 2) 381 | file="ipdb.txt" 382 | process_ip_concurrently "$file" 383 | ;; 384 | 3) 385 | file="FDYMIP.txt" 386 | process_ip_concurrently "$file" 387 | ;; 388 | 4) 389 | file="GFYMIP.txt" 390 | process_ip_concurrently "$file" 391 | ;; 392 | 5) 393 | echo "退出程序." 394 | break 395 | ;; 396 | *) 397 | echo "无效选项,请重新选择." 398 | ;; 399 | esac 400 | done 401 | 402 | } 403 | 404 | # 第六个功能 405 | function6() { 406 | # Function to process IP addresses and save them to country-specific files 407 | process_ip() { 408 | local ip=$1 409 | local file=$2 410 | local country 411 | 412 | # Check if IP address has already been processed 413 | if grep -q "$ip" "${file%%.*}/processed_ips.txt"; then 414 | echo "IP地址 $ip 已经处理过,跳过处理。" 415 | return 416 | fi 417 | 418 | # Query IP address information using GeoLite2-Country.mmdb 419 | country=$(mmdblookup --file ~/GeoLite2-Country.mmdb --ip "$ip" country iso_code) 420 | 421 | # Extract country code from the response 422 | country=$(echo "$country" | sed -n 's/^.*"\(.*\)".*$/\1/p') 423 | 424 | # Check if country information is valid 425 | if [ -z "$country" ]; then 426 | echo "查询 $ip 失败,跳过处理。" 427 | return 428 | fi 429 | 430 | echo "IP地址: $ip, 国家: $country" 431 | echo "$ip" >> "${file%%.*}/processed_ips.txt" 432 | echo "$ip" >> "${file%%.*}/$country.txt" 433 | } 434 | 435 | # Remove duplicate IP addresses from a file 436 | remove_duplicates() { 437 | local file=$1 438 | awk '!seen[$0]++' "$file" > "$file.tmp" && mv "$file.tmp" "$file" 439 | } 440 | 441 | # Main function to process IP addresses 442 | process_ip_concurrently() { 443 | local file=$1 444 | local ips=( $(<"$file") ) 445 | local ip 446 | local index=0 447 | 448 | mkdir -p "${file%%.*}" 449 | touch "${file%%.*}/processed_ips.txt" 450 | 451 | while [ $index -lt ${#ips[@]} ]; do 452 | for (( i=0; i<5 && index<${#ips[@]}; i++ )); do 453 | ip="${ips[index]}" 454 | 455 | # Check if IP address has already been processed 456 | if grep -q "$ip" "${file%%.*}/processed_ips.txt"; then 457 | echo "IP地址 $ip 已经处理过,跳过处理。" 458 | ((index++)) 459 | continue 460 | fi 461 | 462 | process_ip "$ip" "$file" & 463 | ((index++)) 464 | done 465 | done 466 | 467 | wait 468 | 469 | echo "查询完成!" 470 | 471 | # Remove processed_ips.txt file 472 | rm "${file%%.*}/processed_ips.txt" 473 | 474 | # Remove duplicate IP addresses 475 | remove_duplicates "$file" 476 | } 477 | 478 | # Main menu 479 | while true; do 480 | echo "----- 选择一个选项 -----" 481 | echo "1. 读取zipbaipiao.txt" 482 | echo "2. 读取ipdb.txt" 483 | echo "3. 读取FDYMIP.txt" 484 | echo "4. 读取GFYMIP.txt" 485 | echo "5. 退出" 486 | 487 | read -p "请选择一个选项: " choice 488 | 489 | case $choice in 490 | 1) 491 | file="zipbaipiao.txt" 492 | process_ip_concurrently "$file" 493 | ;; 494 | 2) 495 | file="ipdb.txt" 496 | process_ip_concurrently "$file" 497 | ;; 498 | 3) 499 | file="FDYMIP.txt" 500 | process_ip_concurrently "$file" 501 | ;; 502 | 4) 503 | file="GFYMIP.txt" 504 | process_ip_concurrently "$file" 505 | ;; 506 | 5) 507 | echo "退出程序." 508 | break 509 | ;; 510 | *) 511 | echo "无效选项,请重新选择." 512 | ;; 513 | esac 514 | done 515 | } 516 | # 第七个功能:测速 517 | function7() { 518 | # 函数7的内容 519 | #!/bin/bash 520 | 521 | # 清空屏幕 522 | clear 523 | 524 | echo "欢迎使用越测越开心脚本!" 525 | echo "请选择要测试的协议:" 526 | echo "1. HTTP" 527 | echo "2. HTTPS" 528 | 529 | read -p "请输入选项: " choice 530 | 531 | case $choice in 532 | 1) 533 | echo "您选择了 HTTP 协议" 534 | http_ports=("80" "8080" "8880" "2052" "2082" "2086" "2095") 535 | ;; 536 | 2) 537 | echo "您选择了 HTTPS 协议" 538 | https_ports=("443" "2053" "2083" "2087" "2096" "8443") 539 | ;; 540 | *) 541 | echo "无效选项,退出脚本" 542 | exit 1 543 | ;; 544 | esac 545 | 546 | # 选择端口 547 | if [ $choice -eq 1 ]; then 548 | echo "请选择一个端口进行测试:" 549 | select port in "${http_ports[@]}"; do 550 | if [[ " ${http_ports[@]} " =~ " $port " ]]; then 551 | echo "您选择的端口是: $port" 552 | break 553 | else 554 | echo "无效的端口,请重新选择" 555 | fi 556 | done 557 | else 558 | echo "请选择一个端口进行测试:" 559 | select port in "${https_ports[@]}"; do 560 | if [[ " ${https_ports[@]} " =~ " $port " ]]; then 561 | echo "您选择的端口是: $port" 562 | break 563 | else 564 | echo "无效的端口,请重新选择" 565 | fi 566 | done 567 | fi 568 | 569 | # 选择文本文件 570 | echo "请选择一个文本文件进行测试:" 571 | text_files=("HK.txt" "KR.txt" "SG.txt" "GFYMIP.txt" "TW.txt" "AE.txt" "US.txt" "DE.txt" "JP.txt" "CA.txt" "CH.txt" "GB.txt" "IN.txt" "IT.txt" "NL.txt" "BG.txt" "FR.txt" "DK.txt" "PH.txt" "SE.txt" "CN.txt" "ID.txt") 572 | select text_file in "${text_files[@]}"; do 573 | if [[ " ${text_files[@]} " =~ " $text_file " ]]; then 574 | echo "您选择的文本文件是: $text_file" 575 | break 576 | else 577 | echo "无效的文本文件,请重新选择" 578 | fi 579 | done 580 | 581 | # 查找并合并同一目录及子目录下的 $text_file 582 | merged_file="${text_file}" 583 | if [ "$text_file" != "GFYMIP.txt" ]; then 584 | find . -type f -name "$text_file" -exec cat {} + > "$merged_file" 585 | fi 586 | 587 | # 去除重复 IP 588 | awk '!seen[$0]++' "$merged_file" > "$merged_file.unique" 589 | mv "$merged_file.unique" "$merged_file" 590 | 591 | # 复制合并后的文件到脚本根目录 592 | cp "$merged_file" . 593 | echo "文件已复制到脚本目录:$merged_file" 594 | 595 | 596 | # 执行测试命令 597 | echo "开始执行测试..." 598 | if [ $choice -eq 1 ]; then 599 | ./CloudflareST -tp $port -f $text_file -n 200 -dn 10 -sl 10 -tl 400 -url http://cs.notls.zjccc.onflashdrive.app/200m -dd 600 | else 601 | ./CloudflareST -tp $port -f $text_file -n 200 -dn 10 -sl 10 -tl 400 -url https://cs.notls.zjccc.onflashdrive.app/200m -dd 602 | fi 603 | 604 | echo "测试完成!" 605 | 606 | } 607 | 608 | # 第八个功能:转换成txt 609 | function8() { 610 | # 函数8的内容 611 | # 提取IP地址 612 | ips=$(cut -d',' -f1 result.csv | tail -n +2) 613 | 614 | # 用户自定义字符 615 | read -p "请输入自定义字符: " custom_char 616 | 617 | # 获取当前时间 618 | current_time=$(date +"%Y-%m-%d_%H-%M-%S") 619 | 620 | # 生成带时间戳的文件名 621 | file_name="${current_time}_GS.txt" 622 | 623 | # 定义计数器 624 | count=1 625 | 626 | # 将内容写入带时间戳的文件 627 | for ip in $ips 628 | do 629 | echo "$ip:${custom_char}${count}" >> "$file_name" 630 | ((count++)) 631 | done 632 | 633 | echo "已生成带时间戳的文件: $file_name" 634 | 635 | } 636 | 637 | # 主菜单 638 | while true; do 639 | echo "请选择一个选项,推荐用ipdb获取ip:" 640 | echo "1. zipbaipiao" 641 | echo "2. ipdb" 642 | echo "3. FDYM" 643 | echo "4. GFYM" 644 | echo "5. API识别国家" 645 | echo "6. 离线识别国家" 646 | echo "7. 测速" 647 | echo "8. 转txt" 648 | echo "9. 退出" 649 | 650 | read -p "选择: " choice 651 | 652 | case $choice in 653 | 1) function1 ;; 654 | 2) function2 ;; 655 | 3) function3 ;; 656 | 4) function4 ;; 657 | 5) function5 ;; 658 | 6) function6 ;; 659 | 7) function7 ;; 660 | 8) function8 ;; 661 | 9) echo "退出程序。再见!"; break ;; 662 | *) echo "无效的选择。请重新选择一个有效的选项。" ;; 663 | esac 664 | done 665 | -------------------------------------------------------------------------------- /安卓手机/终端测试/cesu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 清空屏幕 4 | clear 5 | 6 | echo "欢迎使用越测越开心脚本!" 7 | echo "请选择要测试的协议:" 8 | echo "1. HTTP" 9 | echo "2. HTTPS" 10 | 11 | read -p "请输入选项: " choice 12 | 13 | case $choice in 14 | 1) 15 | echo "您选择了 HTTP 协议" 16 | http_ports=("80" "8080" "8880" "2052" "2082" "2086" "2095") 17 | ;; 18 | 2) 19 | echo "您选择了 HTTPS 协议" 20 | https_ports=("443" "2053" "2083" "2087" "2096" "8443") 21 | ;; 22 | *) 23 | echo "无效选项,退出脚本" 24 | exit 1 25 | ;; 26 | esac 27 | 28 | # 选择端口 29 | if [ $choice -eq 1 ]; then 30 | echo "请选择一个端口进行测试:" 31 | select port in "${http_ports[@]}"; do 32 | if [[ " ${http_ports[@]} " =~ " $port " ]]; then 33 | echo "您选择的端口是: $port" 34 | break 35 | else 36 | echo "无效的端口,请重新选择" 37 | fi 38 | done 39 | else 40 | echo "请选择一个端口进行测试:" 41 | select port in "${https_ports[@]}"; do 42 | if [[ " ${https_ports[@]} " =~ " $port " ]]; then 43 | echo "您选择的端口是: $port" 44 | break 45 | else 46 | echo "无效的端口,请重新选择" 47 | fi 48 | done 49 | fi 50 | 51 | # 选择文本文件 52 | echo "请选择一个文本文件进行测试:" 53 | text_files=("HK.txt" "KR.txt" "SG.txt" "GFYMIP.txt" "TW.txt" "AE.txt" "US.txt" "DE.txt" "JP.txt" "CA.txt" "CH.txt" "GB.txt" "IN.txt" "IT.txt" "NL.txt" "BG.txt" "FR.txt" "DK.txt" "PH.txt" "SE.txt" "CN.txt" "ID.txt") 54 | select text_file in "${text_files[@]}"; do 55 | if [[ " ${text_files[@]} " =~ " $text_file " ]]; then 56 | echo "您选择的文本文件是: $text_file" 57 | break 58 | else 59 | echo "无效的文本文件,请重新选择" 60 | fi 61 | done 62 | 63 | # 查找并合并同一目录及子目录下的 $text_file 64 | merged_file="${text_file}" 65 | if [ "$text_file" != "GFYMIP.txt" ]; then 66 | find . -type f -name "$text_file" -exec cat {} + > "$merged_file" 67 | fi 68 | 69 | # 去除重复 IP 70 | awk '!seen[$0]++' "$merged_file" > "$merged_file.unique" 71 | mv "$merged_file.unique" "$merged_file" 72 | 73 | # 复制合并后的文件到脚本根目录 74 | cp "$merged_file" . 75 | echo "文件已复制到脚本目录:$merged_file" 76 | 77 | 78 | # 执行测试命令 79 | echo "开始执行测试..." 80 | if [ $choice -eq 1 ]; then 81 | ./CloudflareST -tp $port -f $text_file -n 200 -dn 10 -sl 10 -tl 400 -url http://cs.notls.zjccc.onflashdrive.app/200m 82 | else 83 | ./CloudflareST -tp $port -f $text_file -n 200 -dn 10 -sl 10 -tl 400 -url https://cs.notls.zjccc.onflashdrive.app/200m 84 | fi 85 | 86 | echo "测试完成!" 87 | -------------------------------------------------------------------------------- /安卓手机/终端测试/ip.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 欢迎语 4 | echo "一起白嫖吧!" 5 | # 获取当前工作目录 6 | current_dir=$(pwd) 7 | 8 | # 定义检查网络连通性的函数 9 | check_network_access() { 10 | url=\$1 11 | if curl --output /dev/null --silent --head --fail "$url"; then 12 | return 0 13 | else 14 | return 1 15 | fi 16 | } 17 | 18 | # 第一个功能:下载文件并处理 19 | function1() { 20 | cd "$(dirname "$0")" 21 | 22 | # 清除之前的 txt 目录 23 | rm -rf txt > /dev/null 2>&1 24 | 25 | # 询问用户是否更新本地 txt.zip 数据 26 | read -p "是否更新本地 txt.zip 数据? (0不更新、1更新(默认)): " updatezip 27 | if [ -z "$updatezip" ]; then 28 | updatezip=1 29 | fi 30 | 31 | # 如果用户选择更新,则从指定的 URL 下载数据文件 32 | if [[ $updatezip -eq 1 ]]; then 33 | echo "正在从 https://zip.baipiao.eu.org 下载数据文件" 34 | curl -# https://zip.baipiao.eu.org -o txt.zip 35 | if [ $? -ne 0 ]; then 36 | echo "下载失败,请检查网络连接或手动下载并放置在本目录" 37 | exit 1 38 | fi 39 | echo "下载完成" 40 | fi 41 | 42 | # 下载完成后尝试解压 43 | if [[ -e "txt.zip" ]]; then 44 | echo "正在解压下载的文件" 45 | unzip -o txt.zip -d txt || echo "解压失败,请检查文件是否损坏或权限不足。" 46 | echo "解压成功,删除原压缩包" 47 | rm txt.zip 48 | else 49 | echo "下载文件不存在,无法解压" 50 | fi 51 | 52 | # 合并 txt 目录中的所有文本文件,并去除重复的IP地址 53 | if [[ -d "txt" ]]; then 54 | echo "正在合并 txt 目录中的所有文本文件,并去除重复的IP地址" 55 | cat txt/*.txt | awk '!seen[$0]++' > zipbaipiao.txt 56 | echo "合并成功,文件已保存为 zipbaipiao.txt" 57 | else 58 | echo "txt 目录不存在,无法合并文件" 59 | fi 60 | 61 | # 移动文件 62 | if [[ -e "zipbaipiao.txt" ]]; then 63 | echo "正在移动文件" 64 | mv zipbaipiao.txt "$script_dir/" || echo "移动失败,请检查目标目录是否存在并具有足够的权限。" 65 | echo "移动成功" 66 | else 67 | echo "文件不存在,无法移动" 68 | fi 69 | } 70 | # 第二个功能:获取IP地址并追加到文件 71 | function2() { 72 | url="https://ipdb.api.030101.xyz/?type=proxy" 73 | file_path="ipdb.txt" 74 | 75 | ip_addresses=$(curl -s "$url" | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b") 76 | 77 | if [ -f "$file_path" ]; then 78 | echo "文件已存在,追加新的IP地址到文件中..." 79 | else 80 | echo "文件不存在,创建文件..." 81 | touch "$file_path" 82 | fi 83 | 84 | for ip in $ip_addresses; do 85 | if ! grep -q "$ip" "$file_path"; then 86 | echo "$ip" >> "$file_path" 87 | echo "追加新的IP地址到文件中: $ip" 88 | else 89 | echo "IP地址已存在,跳过: $ip" 90 | fi 91 | done 92 | 93 | echo "IP地址已更新到 $file_path 文件。" 94 | } 95 | 96 | # 第三个功能:查询反代域名的IPv4地址并追加到文件 97 | function3() { 98 | # 第三个脚本内容 99 | # 函数用于检查是否为IPv4地址 100 | is_ipv4() { 101 | address=\$1 102 | if [[ $address =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then 103 | return 0 104 | else 105 | return 1 106 | fi 107 | } 108 | 109 | # 要查询的域名列表,每个域名占据一行 110 | domains=' 111 | acjp2.cloudflarest.link 112 | bestproxy.onecf.eu.org 113 | acsg.cloudflarest.link 114 | acsg3.cloudflarest.link 115 | acjp.cloudflarest.link 116 | cdn.shanggan.pp.ua 117 | best.cdn.sqeven.cn 118 | proxy.xxxxxxxx.tk 119 | jp.anxray.top 120 | jpcdn.raises.top 121 | achk2.cloudflarest.link 122 | yx.blessbai.tech 123 | qq.achen.link 124 | cf.akaagiao.link 125 | jp.anxray.top.cdn.cloudflare.net 126 | cf.ts7575.top 127 | yx.blessbai.tech 128 | bestproxy.wcccc.fun 129 | www.xfltd.top 130 | 1.achen.link 131 | cf.flyff.eu.org 132 | ak.yydsb.link 133 | ' 134 | 135 | # 将字符串按换行符分割成数组 136 | IFS=$'\n' read -r -d '' -a domains_array <<< "$domains" 137 | 138 | # 打开文件准备追加新的IPv4地址 139 | file_path="FDYMIP.txt" 140 | 141 | # 读取已有的IP地址 142 | existing_ips=() 143 | if [ -f "$file_path" ]; then 144 | while IFS= read -r line; do 145 | existing_ips+=("$line") 146 | done < "$file_path" 147 | fi 148 | 149 | # 打开文件准备追加新的IPv4地址,如果文件不存在则创建 150 | for domain in "${domains_array[@]}"; do 151 | result=$(dig +short "$domain" | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}') 152 | ips=($(echo "$result" | tr ' ' '\n' | sort -u)) 153 | 154 | for ip in "${ips[@]}"; do 155 | if ! [[ " ${existing_ips[@]} " =~ " $ip " ]]; then 156 | echo "$ip" >> "$file_path" 157 | echo "$domain - $ip added to file" 158 | fi 159 | done 160 | done 161 | 162 | echo "新的IPv4地址追加完成。" 163 | 164 | } 165 | 166 | # 第四个功能:查询官方域名的IPv4地址并追加到文件 167 | function4() { 168 | # 第四个脚本内容 169 | # 函数用于检查是否为IPv4地址 170 | is_ipv4() { 171 | address=\$1 172 | if [[ $address =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then 173 | return 0 174 | else 175 | return 1 176 | fi 177 | } 178 | 179 | # 要查询的域名列表,每个域名占据一行 180 | domains=' 181 | icook.hk 182 | ip.sb 183 | japan.com 184 | skk.moe 185 | www.visa.com 186 | www.visa.co.jp 187 | www.visakorea.com 188 | www.gco.gov.qa 189 | www.csgo.com 190 | www.whatismyip.com 191 | gamer.com.tw 192 | steamdb.info 193 | toy-people.com 194 | silkbook.com 195 | cdn.anycast.eu.org 196 | shopify.com 197 | www.visa.com.tw 198 | time.is 199 | www.hugedomains.com 200 | www.visa.com.sg 201 | www.whoer.net 202 | www.visa.com.hk 203 | malaysia.com 204 | www.ipget.net 205 | icook.tw 206 | www.gov.ua 207 | www.udacity.com 208 | www.shopify.com 209 | singapore.com 210 | russia.com 211 | www.4chan.org 212 | www.glassdoor.com 213 | xn--b6gac.eu.org 214 | www.digitalocean.com 215 | www.udemy.com 216 | cdn-all.xn--b6gac.eu.org 217 | dnschecker.org 218 | tasteatlas.com 219 | pixiv.net 220 | comicabc.com 221 | cfip.xxxxxxxx.tk 222 | ' 223 | 224 | # 将字符串按换行符分割成数组 225 | IFS=$'\n' read -r -d '' -a domains_array <<< "$domains" 226 | 227 | # 打开文件准备追加新的IPv4地址 228 | file_path="GFYMIP.txt" 229 | 230 | # 读取已有的IP地址 231 | existing_ips=() 232 | if [ -f "$file_path" ]; then 233 | while IFS= read -r line; do 234 | existing_ips+=("$line") 235 | done < "$file_path" 236 | fi 237 | 238 | # 打开文件准备追加新的IPv4地址,如果文件不存在则创建 239 | for domain in "${domains_array[@]}"; do 240 | result=$(dig +short "$domain" | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}') 241 | ips=($(echo "$result" | tr ' ' '\n' | sort -u)) 242 | 243 | for ip in "${ips[@]}"; do 244 | if ! [[ " ${existing_ips[@]} " =~ " $ip " ]]; then 245 | echo "$ip" >> "$file_path" 246 | echo "$domain - $ip added to file" 247 | fi 248 | done 249 | done 250 | 251 | echo "新的IPv4地址追加完成。" 252 | } 253 | 254 | # 主菜单 255 | while true; do 256 | echo "请选择一个选项:" 257 | echo "1. zip.baipiao" 258 | echo "2. ipdb" 259 | echo "3. fdym" 260 | echo "4. gfym" 261 | echo "5. Exit" 262 | 263 | read -p "选择吧,推荐第二个: " choice 264 | 265 | case $choice in 266 | 1) function1 ;; 267 | 2) function2 ;; 268 | 3) function3 ;; 269 | 4) function4 ;; 270 | 5) echo "退出程序。再见!"; break ;; 271 | *) echo "无效的选择。请重新选择一个有效的选项。" ;; 272 | esac 273 | done 274 | -------------------------------------------------------------------------------- /安卓手机/终端测试/txt.sh: -------------------------------------------------------------------------------- 1 | # 提取IP地址 2 | ips=$(cut -d',' -f1 result.csv | tail -n +2) 3 | 4 | # 用户自定义字符 5 | read -p "请输入自定义字符: " custom_char 6 | 7 | # 获取当前时间 8 | current_time=$(date +"%Y-%m-%d_%H-%M-%S") 9 | 10 | # 生成带时间戳的文件名 11 | file_name="${current_time}_GS.txt" 12 | 13 | # 定义计数器 14 | count=1 15 | 16 | # 将内容写入带时间戳的文件 17 | for ip in $ips 18 | do 19 | echo "$ip:${custom_char}${count}" >> "$file_name" 20 | ((count++)) 21 | done 22 | 23 | echo "已生成带时间戳的文件: $file_name" 24 | -------------------------------------------------------------------------------- /电脑使用PY.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/电脑使用PY.zip -------------------------------------------------------------------------------- /电脑使用PY/1-0下载并解压.py: -------------------------------------------------------------------------------- 1 | import os 2 | import requests 3 | import zipfile 4 | 5 | # 设置代理信息 6 | proxy_host = "127.0.0.1" 7 | proxy_port = 7897 8 | proxies = { 9 | 'http': f'socks5://{proxy_host}:{proxy_port}', 10 | 'https': f'socks5://{proxy_host}:{proxy_port}' 11 | } 12 | 13 | # 获取当前工作目录 14 | current_dir = os.getcwd() 15 | 16 | # 定义检查网络连通性的函数 17 | def check_network_access(url): 18 | try: 19 | response = requests.get(url) 20 | return True 21 | except requests.exceptions.RequestException: 22 | return False 23 | 24 | # 定义要访问的网页 URL 25 | url = "https://zip.baipiao.eu.org/" 26 | 27 | # 判断当前网络是否能够正常访问网页 28 | if check_network_access(url): 29 | response = requests.get(url, verify=True) # 设置verify=True进行SSL证书验证 30 | else: 31 | response = requests.get(url, proxies=proxies, verify=True) # 使用 SOCKS5 代理访问 32 | 33 | # 将文件下载到本地 34 | with open(os.path.join(current_dir, "txt.zip"), "wb") as file: 35 | file.write(response.content) 36 | 37 | # 检查文件是否为ZIP文件 38 | if not zipfile.is_zipfile(os.path.join(current_dir, "txt.zip")): 39 | print("下载的文件不是一个有效的ZIP文件。") 40 | else: 41 | # 解压文件到txt文件夹 42 | with zipfile.ZipFile(os.path.join(current_dir, "txt.zip"), 'r') as zip_ref: 43 | zip_ref.extractall(os.path.join(current_dir, "txt")) 44 | 45 | # 合并所有文本文件为一个文件 46 | with open(os.path.join(current_dir, "zipbaipiao.txt"), "w") as output_file: 47 | for root, dirs, files in os.walk(os.path.join(current_dir, "txt")): 48 | for file in files: 49 | if file.endswith(".txt"): 50 | with open(os.path.join(root, file), "r") as input_file: 51 | output_file.write(input_file.read() + "\n") 52 | 53 | # 移动文件到脚本目录 54 | os.replace(os.path.join(current_dir, "zipbaipiao.txt"), os.path.join(current_dir, "zipbaipiao.txt")) 55 | 56 | # 删除原始压缩文件和解压后的文件夹 57 | os.remove(os.path.join(current_dir, "txt.zip")) 58 | for root, dirs, files in os.walk(os.path.join(current_dir, "txt")): 59 | for file in files: 60 | os.remove(os.path.join(root, file)) 61 | os.rmdir(os.path.join(current_dir, "txt")) 62 | 63 | print("文件下载、解压、合并和移动完成。") 64 | 65 | # 删除txt.zip文件 66 | if os.path.exists(os.path.join(current_dir, "txt.zip")): 67 | os.remove(os.path.join(current_dir, "txt.zip")) 68 | print("已删除txt.zip文件。") 69 | -------------------------------------------------------------------------------- /电脑使用PY/1-1获取网页.py: -------------------------------------------------------------------------------- 1 | import os 2 | import requests 3 | import re 4 | 5 | # 检测网络是否正常访问网页 6 | def check_network(url): 7 | try: 8 | response = requests.get(url) 9 | return True 10 | except requests.exceptions.RequestException: 11 | return False 12 | 13 | def get_ips_from_url(url, use_proxy=False): 14 | if use_proxy: 15 | proxies = { 16 | 'http': 'socks5://127.0.0.1:7897', 17 | 'https': 'socks5://127.0.0.1:7897' 18 | } 19 | else: 20 | proxies = None 21 | 22 | # 发送请求获取页面内容 23 | response = requests.get(url, proxies=proxies) 24 | ip_addresses = re.findall(r'\d+\.\d+\.\d+\.\d+', response.text) 25 | 26 | return ip_addresses 27 | 28 | def update_ip_file(ip_addresses, file_path): 29 | print("最新的IP地址:", ip_addresses) 30 | 31 | # 检查文件是否存在,如果不存在,则创建 32 | if not os.path.exists(file_path): 33 | print("文件不存在,创建文件...") 34 | with open(file_path, 'w'): 35 | pass 36 | else: 37 | print("文件已存在,检查是否有重复的IP地址...") 38 | 39 | # 打开文件并读取已有的IP地址 40 | existing_ips = set() 41 | with open(file_path, 'r') as file: 42 | for line in file: 43 | existing_ip = line.strip() 44 | print("已有IP地址:", existing_ip) 45 | existing_ips.add(existing_ip) 46 | 47 | # 检查最新的IP地址是否与已有的IP地址重复,如果不重复则追加到文件中 48 | new_ips = set(ip_addresses) 49 | with open(file_path, 'a') as file: 50 | for ip in new_ips: 51 | if ip not in existing_ips: 52 | file.write(ip + '\n') 53 | print("追加新的IP地址到文件中:", ip) 54 | else: 55 | print("IP地址已存在,跳过:", ip) 56 | 57 | if __name__ == "__main__": 58 | url = 'https://ipdb.api.030101.xyz/?type=proxy' 59 | 60 | if check_network(url): 61 | print("当前网络可以正常访问该网页,不需要走代理获取IP地址。") 62 | ip_addresses = get_ips_from_url(url, use_proxy=False) 63 | else: 64 | print("当前网络无法访问该网页,将使用代理获取IP地址。") 65 | ip_addresses = get_ips_from_url(url, use_proxy=True) 66 | 67 | update_ip_file(ip_addresses, 'ipdb.txt') 68 | -------------------------------------------------------------------------------- /电脑使用PY/1-2CF反代域名dns记录.py: -------------------------------------------------------------------------------- 1 | import socket 2 | import os 3 | 4 | # 函数用于检查是否为IPv4地址 5 | def is_ipv4(address): 6 | try: 7 | socket.inet_pton(socket.AF_INET, address) 8 | return True 9 | except socket.error: 10 | return False 11 | 12 | # 获取脚本文件名(不包含扩展名) 13 | script_name = os.path.splitext(os.path.basename(__file__))[0] 14 | 15 | # 要查询的域名列表,每个域名占据一行 16 | domains = ''' 17 | acjp2.cloudflarest.link 18 | bestproxy.onecf.eu.org 19 | acsg.cloudflarest.link 20 | acsg3.cloudflarest.link 21 | acjp.cloudflarest.link 22 | cdn.shanggan.pp.ua 23 | best.cdn.sqeven.cn 24 | proxy.xxxxxxxx.tk 25 | jp.anxray.top 26 | jpcdn.raises.top 27 | achk2.cloudflarest.link 28 | yx.blessbai.tech 29 | ''' 30 | 31 | domains = domains.strip().split('\n') # 将字符串按换行符分割成列表 32 | 33 | # 打开文件准备追加新的IPv4地址 34 | file_path = 'FDYMIP.txt' 35 | 36 | # 读取已有的IP地址 37 | existing_ips = set() 38 | if os.path.exists(file_path): 39 | with open(file_path, 'r') as file: 40 | for line in file: 41 | existing_ips.add(line.strip()) 42 | 43 | # 打开文件准备追加新的IPv4地址,如果文件不存在则创建 44 | with open(file_path, 'a+') as file: 45 | for domain in domains: 46 | try: 47 | # 获取完整的DNS解析结果 48 | result = socket.getaddrinfo(domain, None) 49 | ips = set([x[-1][0] for x in result if is_ipv4(x[-1][0])]) # 提取IPv4地址并去重 50 | 51 | for ip in ips: 52 | if ip not in existing_ips: 53 | file.write(ip + '\n') 54 | print(f'{domain} - {ip} added to file') 55 | except (socket.gaierror, socket.herror) as e: 56 | print(f'Failed to resolve {domain}: {e}') 57 | 58 | print('新的IPv4地址追加完成。') 59 | -------------------------------------------------------------------------------- /电脑使用PY/1-3 CF官方域名DNS记录(这个没必要获取地区信息.py: -------------------------------------------------------------------------------- 1 | import socket 2 | import os 3 | 4 | # 函数用于检查是否为IPv4地址 5 | def is_ipv4(address): 6 | try: 7 | socket.inet_pton(socket.AF_INET, address) 8 | return True 9 | except socket.error: 10 | return False 11 | 12 | # 函数用于检查是否为IPv6地址 13 | def is_ipv6(address): 14 | try: 15 | socket.inet_pton(socket.AF_INET6, address) 16 | return True 17 | except socket.error: 18 | return False 19 | 20 | # 获取脚本文件名(不包含扩展名) 21 | script_name = os.path.splitext(os.path.basename(__file__))[0] 22 | 23 | # 要查询的域名列表,每个域名占据一行 24 | domains = ''' 25 | icook.hk 26 | ip.sb 27 | japan.com 28 | skk.moe 29 | www.visa.com 30 | www.visa.co.jp 31 | www.visakorea.com 32 | www.gco.gov.qa 33 | www.csgo.com 34 | www.whatismyip.com 35 | gamer.com.tw 36 | steamdb.info 37 | toy-people.com 38 | silkbook.com 39 | cdn.anycast.eu.org 40 | shopify.com 41 | www.visa.com.tw 42 | time.is 43 | www.hugedomains.com 44 | www.visa.com.sg 45 | www.whoer.net 46 | www.visa.com.hk 47 | malaysia.com 48 | www.ipget.net 49 | icook.tw 50 | www.gov.ua 51 | www.udacity.com 52 | www.shopify.com 53 | singapore.com 54 | russia.com 55 | www.4chan.org 56 | www.glassdoor.com 57 | xn--b6gac.eu.org 58 | www.digitalocean.com 59 | www.udemy.com 60 | cdn-all.xn--b6gac.eu.org 61 | dnschecker.org 62 | tasteatlas.com 63 | pixiv.net 64 | comicabc.com 65 | cfip.xxxxxxxx.tk 66 | ''' 67 | 68 | domains = domains.strip().split('\n') # 将字符串按换行符分割成列表 69 | 70 | # 打开文件准备追加新的IPv4地址 71 | ipv4_file_path = 'GFYMIP.txt' 72 | 73 | # 打开文件准备追加新的IPv6地址 74 | ipv6_file_path = 'GFYMIP-IPv6.txt' 75 | 76 | # 读取已有的IPv4地址 77 | existing_ipsv4 = set() 78 | if os.path.exists(ipv4_file_path): 79 | with open(ipv4_file_path, 'r') as ipv4_file: 80 | for line in ipv4_file: 81 | existing_ipsv4.add(line.strip()) 82 | 83 | # 读取已有的IPv6地址 84 | existing_ipsv6 = set() 85 | if os.path.exists(ipv6_file_path): 86 | with open(ipv6_file_path, 'r') as ipv6_file: 87 | for line in ipv6_file: 88 | existing_ipsv6.add(line.strip()) 89 | 90 | # 打开文件准备追加新的IPv4地址,如果文件不存在则创建 91 | with open(ipv4_file_path, 'a+') as ipv4_file: 92 | for domain in domains: 93 | try: 94 | # 获取完整的DNS解析结果 95 | result = socket.getaddrinfo(domain, None) 96 | ipsv4 = set([x[-1][0] for x in result if is_ipv4(x[-1][0])]) # 提取IPv4地址并去重 97 | ipsv6 = set([x[-1][0] for x in result if is_ipv6(x[-1][0])]) # 提取IPv6地址并去重 98 | 99 | for ip in ipsv4: 100 | if ip not in existing_ipsv4: 101 | ipv4_file.write(ip + '\n') 102 | print(f'{domain} - {ip} added to IPv4 file') 103 | 104 | for ip in ipsv6: 105 | if ip not in existing_ipsv6: 106 | with open(ipv6_file_path, 'a+') as ipv6_file: 107 | ipv6_file.write(ip + '\n') 108 | print(f'{domain} - {ip} added to IPv6 file') 109 | except (socket.gaierror, socket.herror) as e: 110 | print(f'Failed to resolve {domain}: {e}') 111 | 112 | print('新的IPv4地址追加完成。') 113 | print('新的IPv6地址追加完成。') 114 | -------------------------------------------------------------------------------- /电脑使用PY/1-4##4和1获取IP.py: -------------------------------------------------------------------------------- 1 | import os 2 | import requests 3 | import zipfile 4 | import socket 5 | import re 6 | from tkinter import Tk, Label, Button, messagebox 7 | 8 | class Application: 9 | def __init__(self, master=None): 10 | self.master = master 11 | self.label = Label(text="请选择一个操作") 12 | self.label.pack() 13 | self.download_button = Button(text="获取zipbaipiao", command=self.download_and_unzip) 14 | self.download_button.pack() 15 | self.get_webpage_button = Button(text="获取ipdb", command=self.get_webpage) 16 | self.get_webpage_button.pack() 17 | self.get_fdips_button = Button(text="获取反代域名IP", command=self.get_fdips) 18 | self.get_fdips_button.pack() 19 | self.get_gfips_button = Button(text="获取官方域名IP", command=self.get_gfips) 20 | self.get_gfips_button.pack() 21 | 22 | def download_and_unzip(self): 23 | import os 24 | import requests 25 | import zipfile 26 | 27 | # 设置代理信息 28 | proxy_host = "127.0.0.1" 29 | proxy_port = 7897 30 | proxies = { 31 | 'http': f'socks5://{proxy_host}:{proxy_port}', 32 | 'https': f'socks5://{proxy_host}:{proxy_port}' 33 | } 34 | 35 | # 获取当前工作目录 36 | current_dir = os.getcwd() 37 | 38 | # 定义检查网络连通性的函数 39 | def check_network_access(url): 40 | try: 41 | response = requests.get(url) 42 | return True 43 | except requests.exceptions.RequestException: 44 | return False 45 | 46 | # 定义要访问的网页 URL 47 | url = "https://zip.baipiao.eu.org/" 48 | 49 | # 判断当前网络是否能够正常访问网页 50 | if check_network_access(url): 51 | response = requests.get(url, verify=True) # 设置verify=True进行SSL证书验证 52 | else: 53 | response = requests.get(url, proxies=proxies, verify=True) # 使用 SOCKS5 代理访问 54 | 55 | # 将文件下载到本地 56 | with open(os.path.join(current_dir, "txt.zip"), "wb") as file: 57 | file.write(response.content) 58 | 59 | # 检查文件是否为ZIP文件 60 | if not zipfile.is_zipfile(os.path.join(current_dir, "txt.zip")): 61 | print("下载的文件不是一个有效的ZIP文件。") 62 | else: 63 | # 解压文件到txt文件夹 64 | with zipfile.ZipFile(os.path.join(current_dir, "txt.zip"), 'r') as zip_ref: 65 | zip_ref.extractall(os.path.join(current_dir, "txt")) 66 | 67 | # 合并所有文本文件为一个文件 68 | with open(os.path.join(current_dir, "zipbaipiao.txt"), "w") as output_file: 69 | for root, dirs, files in os.walk(os.path.join(current_dir, "txt")): 70 | for file in files: 71 | if file.endswith(".txt"): 72 | with open(os.path.join(root, file), "r") as input_file: 73 | output_file.write(input_file.read() + "\n") 74 | 75 | # 移动文件到脚本目录 76 | os.replace(os.path.join(current_dir, "zipbaipiao.txt"), os.path.join(current_dir, "zipbaipiao.txt")) 77 | 78 | # 删除原始压缩文件和解压后的文件夹 79 | os.remove(os.path.join(current_dir, "txt.zip")) 80 | for root, dirs, files in os.walk(os.path.join(current_dir, "txt")): 81 | for file in files: 82 | os.remove(os.path.join(root, file)) 83 | os.rmdir(os.path.join(current_dir, "txt")) 84 | 85 | print("文件下载、解压、合并和移动完成。") 86 | 87 | # 删除txt.zip文件 88 | if os.path.exists(os.path.join(current_dir, "txt.zip")): 89 | os.remove(os.path.join(current_dir, "txt.zip")) 90 | print("已删除txt.zip文件。") 91 | 92 | messagebox.showinfo("信息", "下载并解压完成") 93 | 94 | def get_webpage(self): 95 | import os 96 | import requests 97 | import re 98 | 99 | # 检测网络是否正常访问网页 100 | def check_network(url): 101 | try: 102 | response = requests.get(url) 103 | return True 104 | except requests.exceptions.RequestException: 105 | return False 106 | 107 | def get_ips_from_url(url, use_proxy=False): 108 | if use_proxy: 109 | proxies = { 110 | 'http': 'socks5://127.0.0.1:7897', 111 | 'https': 'socks5://127.0.0.1:7897' 112 | } 113 | else: 114 | proxies = None 115 | 116 | # 发送请求获取页面内容 117 | response = requests.get(url, proxies=proxies) 118 | ip_addresses = re.findall(r'\d+\.\d+\.\d+\.\d+', response.text) 119 | 120 | return ip_addresses 121 | 122 | def update_ip_file(ip_addresses, file_path): 123 | print("最新的IP地址:", ip_addresses) 124 | 125 | # 检查文件是否存在,如果不存在,则创建 126 | if not os.path.exists(file_path): 127 | print("文件不存在,创建文件...") 128 | with open(file_path, 'w'): 129 | pass 130 | else: 131 | print("文件已存在,检查是否有重复的IP地址...") 132 | 133 | # 打开文件并读取已有的IP地址 134 | existing_ips = set() 135 | with open(file_path, 'r') as file: 136 | for line in file: 137 | existing_ip = line.strip() 138 | print("已有IP地址:", existing_ip) 139 | existing_ips.add(existing_ip) 140 | 141 | # 检查最新的IP地址是否与已有的IP地址重复,如果不重复则追加到文件中 142 | new_ips = set(ip_addresses) 143 | with open(file_path, 'a') as file: 144 | for ip in new_ips: 145 | if ip not in existing_ips: 146 | file.write(ip + '\n') 147 | print("追加新的IP地址到文件中:", ip) 148 | else: 149 | print("IP地址已存在,跳过:", ip) 150 | 151 | if __name__ == "__main__": 152 | url = 'https://ipdb.api.030101.xyz/?type=proxy' 153 | 154 | if check_network(url): 155 | print("当前网络可以正常访问该网页,不需要走代理获取IP地址。") 156 | ip_addresses = get_ips_from_url(url, use_proxy=False) 157 | else: 158 | print("当前网络无法访问该网页,将使用代理获取IP地址。") 159 | ip_addresses = get_ips_from_url(url, use_proxy=True) 160 | 161 | update_ip_file(ip_addresses, 'ipdb.txt') 162 | 163 | messagebox.showinfo("信息", "获取ipdb完成") 164 | 165 | def get_fdips(self): 166 | import socket 167 | import os 168 | 169 | # 函数用于检查是否为IPv4地址 170 | def is_ipv4(address): 171 | try: 172 | socket.inet_pton(socket.AF_INET, address) 173 | return True 174 | except socket.error: 175 | return False 176 | 177 | # 获取脚本文件名(不包含扩展名) 178 | script_name = os.path.splitext(os.path.basename(__file__))[0] 179 | 180 | # 要查询的域名列表,每个域名占据一行 181 | domains = ''' 182 | acjp2.cloudflarest.link 183 | bestproxy.onecf.eu.org 184 | acsg.cloudflarest.link 185 | acsg3.cloudflarest.link 186 | acjp.cloudflarest.link 187 | cdn.shanggan.pp.ua 188 | best.cdn.sqeven.cn 189 | proxy.xxxxxxxx.tk 190 | jp.anxray.top 191 | jpcdn.raises.top 192 | achk2.cloudflarest.link 193 | yx.blessbai.tech 194 | ''' 195 | 196 | domains = domains.strip().split('\n') # 将字符串按换行符分割成列表 197 | 198 | # 打开文件准备追加新的IPv4地址 199 | file_path = 'FDYMIP.txt' 200 | 201 | # 读取已有的IP地址 202 | existing_ips = set() 203 | if os.path.exists(file_path): 204 | with open(file_path, 'r') as file: 205 | for line in file: 206 | existing_ips.add(line.strip()) 207 | 208 | # 打开文件准备追加新的IPv4地址,如果文件不存在则创建 209 | with open(file_path, 'a+') as file: 210 | for domain in domains: 211 | try: 212 | # 获取完整的DNS解析结果 213 | result = socket.getaddrinfo(domain, None) 214 | ips = set([x[-1][0] for x in result if is_ipv4(x[-1][0])]) # 提取IPv4地址并去重 215 | 216 | for ip in ips: 217 | if ip not in existing_ips: 218 | file.write(ip + '\n') 219 | print(f'{domain} - {ip} added to file') 220 | except (socket.gaierror, socket.herror) as e: 221 | print(f'Failed to resolve {domain}: {e}') 222 | 223 | print('新的IPv4地址追加完成。') 224 | 225 | messagebox.showinfo("信息", "获取反代域名IP完成") 226 | 227 | def get_gfips(self): 228 | import socket 229 | import os 230 | 231 | # 函数用于检查是否为IPv4地址 232 | def is_ipv4(address): 233 | try: 234 | socket.inet_pton(socket.AF_INET, address) 235 | return True 236 | except socket.error: 237 | return False 238 | 239 | # 函数用于检查是否为IPv6地址 240 | def is_ipv6(address): 241 | try: 242 | socket.inet_pton(socket.AF_INET6, address) 243 | return True 244 | except socket.error: 245 | return False 246 | 247 | # 获取脚本文件名(不包含扩展名) 248 | script_name = os.path.splitext(os.path.basename(__file__))[0] 249 | 250 | # 要查询的域名列表,每个域名占据一行 251 | domains = ''' 252 | icook.hk 253 | ip.sb 254 | japan.com 255 | skk.moe 256 | www.visa.com 257 | www.visa.co.jp 258 | www.visakorea.com 259 | www.gco.gov.qa 260 | www.csgo.com 261 | www.whatismyip.com 262 | gamer.com.tw 263 | steamdb.info 264 | toy-people.com 265 | silkbook.com 266 | cdn.anycast.eu.org 267 | shopify.com 268 | www.visa.com.tw 269 | time.is 270 | www.hugedomains.com 271 | www.visa.com.sg 272 | www.whoer.net 273 | www.visa.com.hk 274 | malaysia.com 275 | www.ipget.net 276 | icook.tw 277 | www.gov.ua 278 | www.udacity.com 279 | www.shopify.com 280 | singapore.com 281 | russia.com 282 | www.4chan.org 283 | www.glassdoor.com 284 | xn--b6gac.eu.org 285 | www.digitalocean.com 286 | www.udemy.com 287 | cdn-all.xn--b6gac.eu.org 288 | dnschecker.org 289 | tasteatlas.com 290 | pixiv.net 291 | comicabc.com 292 | cfip.xxxxxxxx.tk 293 | ''' 294 | 295 | domains = domains.strip().split('\n') # 将字符串按换行符分割成列表 296 | 297 | # 打开文件准备追加新的IPv4地址 298 | ipv4_file_path = 'GFYMIP.txt' 299 | 300 | # 打开文件准备追加新的IPv6地址 301 | ipv6_file_path = 'GFYMIP-IPv6.txt' 302 | 303 | # 读取已有的IPv4地址 304 | existing_ipsv4 = set() 305 | if os.path.exists(ipv4_file_path): 306 | with open(ipv4_file_path, 'r') as ipv4_file: 307 | for line in ipv4_file: 308 | existing_ipsv4.add(line.strip()) 309 | 310 | # 读取已有的IPv6地址 311 | existing_ipsv6 = set() 312 | if os.path.exists(ipv6_file_path): 313 | with open(ipv6_file_path, 'r') as ipv6_file: 314 | for line in ipv6_file: 315 | existing_ipsv6.add(line.strip()) 316 | 317 | # 打开文件准备追加新的IPv4地址,如果文件不存在则创建 318 | with open(ipv4_file_path, 'a+') as ipv4_file: 319 | for domain in domains: 320 | try: 321 | # 获取完整的DNS解析结果 322 | result = socket.getaddrinfo(domain, None) 323 | ipsv4 = set([x[-1][0] for x in result if is_ipv4(x[-1][0])]) # 提取IPv4地址并去重 324 | ipsv6 = set([x[-1][0] for x in result if is_ipv6(x[-1][0])]) # 提取IPv6地址并去重 325 | 326 | for ip in ipsv4: 327 | if ip not in existing_ipsv4: 328 | ipv4_file.write(ip + '\n') 329 | print(f'{domain} - {ip} added to IPv4 file') 330 | 331 | for ip in ipsv6: 332 | if ip not in existing_ipsv6: 333 | with open(ipv6_file_path, 'a+') as ipv6_file: 334 | ipv6_file.write(ip + '\n') 335 | print(f'{domain} - {ip} added to IPv6 file') 336 | except (socket.gaierror, socket.herror) as e: 337 | print(f'Failed to resolve {domain}: {e}') 338 | 339 | print('新的IPv4地址追加完成。') 340 | print('新的IPv6地址追加完成。') 341 | 342 | messagebox.showinfo("信息", "获取官方域名IP完成") 343 | 344 | root = Tk() 345 | app = Application(root) 346 | root.mainloop() 347 | -------------------------------------------------------------------------------- /电脑使用PY/2-1 识别国家地区且整合.py: -------------------------------------------------------------------------------- 1 | import os 2 | import re 3 | import geoip2.database 4 | import tkinter as tk 5 | from tkinter import filedialog 6 | 7 | def process_file(file_path): 8 | if os.path.exists(file_path): 9 | process_files(file_path) 10 | print(f"处理文件 {os.path.basename(file_path)} 完成!") 11 | else: 12 | print(f"文件 {os.path.basename(file_path)} 不存在!") 13 | 14 | def process_files(file_path): 15 | with open(file_path, 'r') as file: 16 | data = file.read() 17 | # 使用正则表达式查找IP地址并去重处理 18 | ip_addresses = list(set(re.findall(r'\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b', data))) # 去重处理 19 | 20 | reader = geoip2.database.Reader('GeoLite2-Country.mmdb') 21 | country_ip_map = {} 22 | for ip in ip_addresses: 23 | try: 24 | response = reader.country(ip) 25 | country_code = response.country.iso_code 26 | if country_code not in country_ip_map: 27 | country_ip_map[country_code] = [] 28 | country_ip_map[country_code].append(ip) 29 | except: 30 | pass 31 | 32 | folder_name = os.path.splitext(os.path.basename(file_path))[0] 33 | output_folder = os.path.join(os.path.dirname(file_path), folder_name) 34 | os.makedirs(output_folder, exist_ok=True) 35 | 36 | for country_code, ips in country_ip_map.items(): 37 | output_filename = os.path.join(output_folder, f'{country_code}.txt') 38 | with open(output_filename, 'a') as output_file: 39 | for ip in ips: 40 | output_file.write(f'{ip}\n') 41 | 42 | reader.close() 43 | 44 | # 创建 Tkinter 窗口 45 | root = tk.Tk() 46 | root.title("IP 地址处理程序") 47 | 48 | # 创建处理文件按钮 49 | file_names = ['GFYMIP.txt', 'ipdb.txt', 'zipbaipiao.txt', 'FDYMIP.txt'] 50 | 51 | # 创建按钮处理指定文件 52 | for file_name in file_names: 53 | button = tk.Button(root, text=f"处理 {file_name}", command=lambda name=file_name: process_file(os.path.join(os.getcwd(), name))) 54 | button.pack(pady=10) 55 | 56 | # 创建按钮让用户自由选择文件 57 | def select_file(): 58 | file_path = filedialog.askopenfilename(filetypes=[('Text files', '*.txt')]) 59 | if file_path: 60 | process_file(file_path) 61 | 62 | select_file_button = tk.Button(root, text="自由选择文件", command=select_file) 63 | select_file_button.pack(pady=10) 64 | 65 | root.mainloop() 66 | -------------------------------------------------------------------------------- /电脑使用PY/2-2 合并地区相同的txt(用处不大直接用1-1就好了,强烈推荐.py: -------------------------------------------------------------------------------- 1 | import os 2 | import shutil 3 | 4 | def remove_duplicate_ips(input_file, output_file): 5 | unique_ips = set() 6 | 7 | with open(input_file, 'r') as input_f, open(output_file, 'w') as output_f: 8 | for line in input_f: 9 | ip = line.strip() 10 | if ip not in unique_ips: 11 | unique_ips.add(ip) 12 | output_f.write(ip + '\n') 13 | 14 | # 要搜索的文件名列表 15 | file_names = ['HK.txt', 'KR.txt', 'SG.txt', 'US.txt', 'TW.txt', 'AE.txt', 'US.txt', 'DE.txt', 'JP.txt', 'CA.txt', 'CH.txt', 'GB.txt', 'IN.txt', 'IT.txt', 'NL.txt'] 16 | 17 | # 创建合并文件夹前删除原有的合并文件夹 18 | merge_folder = '合并' 19 | if os.path.exists(merge_folder): 20 | shutil.rmtree(merge_folder) 21 | 22 | # 创建新的合并文件夹 23 | os.makedirs(merge_folder) 24 | 25 | # 扫描当前目录及子目录 26 | for root, dirs, files in os.walk('.'): 27 | for file_name in file_names: 28 | found_files = [f for f in files if f == file_name] 29 | 30 | if found_files: 31 | # 合并同名文件内容 32 | merged_ips = set() 33 | for found_file in found_files: 34 | with open(os.path.join(root, found_file), 'r') as f: 35 | for line in f: 36 | ip = line.strip() 37 | merged_ips.add(ip) 38 | 39 | # 写入合并后的内容 40 | with open(os.path.join(merge_folder, file_name), 'w') as merged_file: 41 | for ip in merged_ips: 42 | merged_file.write(ip + '\n') 43 | 44 | print(f"合并文件 {file_name} 完成,共有 {len(merged_ips)} 个唯一IP地址") 45 | 46 | print("合并和去重完成!") 47 | input("按任意键关闭程序...") 48 | -------------------------------------------------------------------------------- /电脑使用PY/3-0越测越开心.py: -------------------------------------------------------------------------------- 1 | import os 2 | import tkinter as tk 3 | from tkinter import messagebox 4 | 5 | # 创建主窗口 6 | root = tk.Tk() 7 | root.title("越测越开心") 8 | root.geometry("400x350") 9 | 10 | selected_port = "" 11 | selected_text = "" 12 | selected_protocol = "" 13 | 14 | http_button = None 15 | https_button = None 16 | 17 | # 检查存在的文本文件 18 | text_files = ['HK.txt', 'KR.txt', 'SG.txt', 'GFYMIP.txt','GFYMIP-IPv6.txt' ,'TW.txt', 'AE.txt', 'US.txt', 'DE.txt', 'JP.txt', 'CA.txt', 'CH.txt', 'GB.txt', 'IN.txt', 'IT.txt', 'NL.txt', 'BG.txt', 'FR.txt', 'DK.txt', 'PH.txt', 'SE.txt', 'CN.txt', 'ID.txt'] 19 | existing_files = [file for file in text_files if os.path.isfile(file)] 20 | 21 | # 创建HTTP按钮和对应端口 22 | def show_http_ports(): 23 | clear_buttons() 24 | http_ports = ['80', '8080', '8880', '2052', '2082', '2086', '2095'] 25 | create_buttons(http_ports, "port") 26 | global selected_protocol 27 | selected_protocol = "HTTP" 28 | 29 | # 创建HTTPS按钮和对应端口 30 | def show_https_ports(): 31 | clear_buttons() 32 | https_ports = ['443', '2053', '2083', '2087', '2096', '8443'] 33 | create_buttons(https_ports, "port") 34 | global selected_protocol 35 | selected_protocol = "HTTPS" 36 | 37 | # 清空按钮 38 | def clear_buttons(): 39 | for widget in root.winfo_children(): 40 | if isinstance(widget, tk.Button): 41 | widget.destroy() 42 | 43 | # 创建按钮 44 | def create_buttons(items, category): 45 | for item in items: 46 | if category == "port": 47 | button = tk.Button(root, text=item, command=lambda i=item: set_port(i)) 48 | elif category == "text": 49 | button = tk.Button(text_frame, text=item, command=lambda i=item: run_cmd(selected_port, i, selected_protocol)) 50 | button.pack() 51 | 52 | # 设置选定的端口 53 | def set_port(port): 54 | global selected_port 55 | selected_port = port 56 | messagebox.showinfo("提示", f"您选择的端口是: {port}") 57 | show_text_selection() 58 | 59 | # 运行CMD指令 60 | def run_cmd(port, text, protocol): 61 | if port and text and protocol: 62 | if protocol == "HTTP": 63 | cmd = f"CloudflareST.exe -tp {port} -f {text} -n 200 -dn 10 -sl 5 -tl 400 -url http://cs.notls.zjccc.onflashdrive.app/200m -dd" 64 | elif protocol == "HTTPS": 65 | cmd = f"CloudflareST.exe -tp {port} -f {text} -n 200 -dn 10 -sl 5 -tl 400 -url https://cs.notls.zjccc.onflashdrive.app/200m -dd" 66 | 67 | os.system(cmd) 68 | 69 | messagebox.showinfo("提示", "测试完成!") 70 | else: 71 | messagebox.showerror("错误", "请先选择端口和文本!") 72 | 73 | # 显示文本选择按钮 74 | def show_text_selection(): 75 | clear_buttons() 76 | 77 | global text_frame 78 | text_frame = tk.Frame(root) 79 | text_frame.pack() 80 | 81 | # 显示存在的文本文件按钮 82 | create_buttons(existing_files, "text") 83 | 84 | # 创建HTTP按钮 85 | http_button = tk.Button(root, text="HTTP", command=show_http_ports) 86 | http_button.pack() 87 | 88 | # 创建HTTPS按钮 89 | https_button = tk.Button(root, text="HTTPS", command=show_https_ports) 90 | https_button.pack() 91 | 92 | # 运行主循环 93 | root.mainloop() 94 | -------------------------------------------------------------------------------- /电脑使用PY/4-0 通用csv表格转格式.py: -------------------------------------------------------------------------------- 1 | import tkinter as tk 2 | from tkinter import filedialog 3 | import pandas as pd 4 | import os 5 | from datetime import datetime 6 | import chardet 7 | 8 | def select_file(): 9 | file_path = filedialog.askopenfilename(title="选择CSV文件", filetypes=[("CSV files", "*.csv")]) 10 | if file_path: 11 | process_csv(file_path) 12 | 13 | def process_csv(file_path): 14 | with open(file_path, 'rb') as f: 15 | result = chardet.detect(f.read()) 16 | encoding = result['encoding'] 17 | df = pd.read_csv(file_path, encoding=encoding) 18 | 19 | if 'IP 地址' not in df.columns: 20 | print("CSV文件中不包含'IP 地址'列。") 21 | return 22 | 23 | ip_addresses = df['IP 地址'] 24 | 25 | custom_text = input("请输入自定义字符: ") 26 | 27 | new_data = [] 28 | for i, ip in enumerate(ip_addresses): 29 | new_data.append(ip + f":{custom_text}_" + str(i+1)) 30 | 31 | current_time = datetime.now().strftime("%Y-%m-%d_%H-%M-%S") 32 | output_file = os.path.join(os.path.dirname(file_path), f"{current_time}_GS.txt") 33 | with open(output_file, "w", encoding='utf-8') as file: 34 | for item in new_data: 35 | file.write("%s\n" % item) 36 | 37 | print("处理后的数据已保存到带时间戳的 GS.txt 文件中。") 38 | 39 | # 创建Tkinter窗口 40 | root = tk.Tk() 41 | root.title("选择CSV文件") 42 | 43 | # 添加选择文件按钮 44 | select_button = tk.Button(root, text="选择CSV文件", command=select_file) 45 | select_button.pack(pady=20) 46 | 47 | # 添加处理结果文件按钮 48 | def process_result_csv(): 49 | file_path = "result.csv" # 修改为实际的结果文件路径 50 | process_csv(file_path) 51 | 52 | process_result_button = tk.Button(root, text="处理result.csv文件", command=process_result_csv) 53 | process_result_button.pack(pady=10) 54 | 55 | root.mainloop() 56 | -------------------------------------------------------------------------------- /电脑使用PY/4-1付费csv表格提取.py: -------------------------------------------------------------------------------- 1 | import tkinter as tk 2 | from tkinter import filedialog 3 | import csv 4 | import os 5 | import datetime 6 | 7 | COUNTRY_CODES = { 8 | "HK": "香港", 9 | "DE": "德国", 10 | "GB": "英国", 11 | "TW": "台湾", 12 | "SG": "新加", 13 | "KR": "韩国", 14 | "US": "美国", 15 | "JP": "日本", 16 | "FR": "法国", 17 | "NL": "荷兰", 18 | # 添加更多国家代码和对应的国家名称 19 | # "OTHER_CODE": "OTHER_NAME", 20 | } 21 | 22 | def extract_ip_and_port_with_country(file_name): 23 | ip_and_port_with_country = [] 24 | country_data = {} # 用于存储每个国家的数据 25 | with open(file_name, 'r', encoding='utf-8') as csvfile: 26 | reader = csv.reader(csvfile) 27 | # 跳过第一行 28 | next(reader) 29 | for row in reader: 30 | ip = row[0].replace(" ", "") 31 | port = row[1].replace(",", "") 32 | country = row[4].replace(" ", "") 33 | country_code = COUNTRY_CODES.get(country, country) 34 | if country_code not in country_data: 35 | country_data[country_code] = [] 36 | country_data[country_code].append((ip, port, country)) 37 | return country_data 38 | 39 | def process_csv(file_path): 40 | country_data = extract_ip_and_port_with_country(file_path) 41 | 42 | # 获取当前日期(年月日) 43 | now = datetime.datetime.now() 44 | date_str = now.strftime("%Y%m%d") 45 | 46 | # 获取文件名(不含扩展名)和扩展名 47 | base_name, _ = os.path.splitext(os.path.basename(file_path)) 48 | 49 | for country_code, ip_ports in country_data.items(): 50 | output_file_name = f"{base_name}_{country_code}_{date_str}.txt" 51 | with open(output_file_name, 'w', encoding='utf-8') as output_file: 52 | index = 1 # 序号从1开始 53 | for ip, port, country in ip_ports: 54 | output_file.write(f"{ip}:{port}#{country_code}_{index}\n") 55 | index += 1 56 | 57 | print("处理后的数据已保存到文件中。") 58 | 59 | def select_file(): 60 | file_path = filedialog.askopenfilename(title="选择CSV文件", filetypes=[("CSV files", "*.csv")]) 61 | if file_path: 62 | process_csv(file_path) 63 | 64 | # 创建Tkinter窗口 65 | root = tk.Tk() 66 | root.title("选择CSV文件") 67 | 68 | # 添加选择文件按钮 69 | select_button = tk.Button(root, text="选择CSV文件", command=select_file) 70 | select_button.pack(pady=20) 71 | 72 | # 添加处理特定文件按钮 73 | def process_HKG_TRUE_IP(): 74 | process_csv("HKG_TRUE_IP.csv") 75 | 76 | def process_ICN_TRUE_IP(): 77 | process_csv("ICN_TRUE_IP.csv") 78 | 79 | def process_SIN_TRUE_IP(): 80 | process_csv("SIN_TRUE_IP.csv") 81 | 82 | def process_TPE_TRUE_IP(): 83 | process_csv("TPE_TRUE_IP.csv") 84 | 85 | def process_45102_HKG_TRUE_IP(): 86 | process_csv("45102_HKG_TRUE_IP.csv") 87 | 88 | # 添加按钮处理特定文件 89 | hkg_button = tk.Button(root, text="处理 HKG_TRUE_IP.csv", command=process_HKG_TRUE_IP) 90 | hkg_button.pack(pady=10) 91 | 92 | icn_button = tk.Button(root, text="处理 ICN_TRUE_IP.csv", command=process_ICN_TRUE_IP) 93 | icn_button.pack(pady=10) 94 | 95 | sin_button = tk.Button(root, text="处理 SIN_TRUE_IP.csv", command=process_SIN_TRUE_IP) 96 | sin_button.pack(pady=10) 97 | 98 | tpe_button = tk.Button(root, text="处理 TPE_TRUE_IP.csv", command=process_TPE_TRUE_IP) 99 | tpe_button.pack(pady=10) 100 | 101 | _45102_hkg_button = tk.Button(root, text="处理 45102_HKG_TRUE_IP.csv", command=process_45102_HKG_TRUE_IP) 102 | _45102_hkg_button.pack(pady=10) 103 | 104 | root.mainloop() 105 | -------------------------------------------------------------------------------- /电脑使用PY/CloudflareST.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/电脑使用PY/CloudflareST.exe -------------------------------------------------------------------------------- /电脑使用PY/GFYMIP-IPv6.txt: -------------------------------------------------------------------------------- 1 | 2606:4700:3031::6815:5ad2 2 | 2606:4700:3037::ac43:a168 3 | 2606:4700:20::ac43:4bac 4 | 2606:4700:20::681a:c1f 5 | 2606:4700:20::681a:d1f 6 | 2606:4700:20::681a:53c 7 | 2606:4700:20::ac43:465c 8 | 2606:4700:20::681a:43c 9 | 2606:4700:3036::ac43:bbdb 10 | 2606:4700:3032::6815:38ca 11 | 2606:4700:10::ac43:54e 12 | 2606:4700:10::6816:e84 13 | 2606:4700:10::6816:f84 14 | 2606:4700:21::681b:ce5c 15 | 2606:4700:21::681b:cf5c 16 | 2001::c73b:95ee 17 | 2606:4700:10::6816:496f 18 | 2606:4700:10::6816:486f 19 | 2606:4700:10::ac43:155d 20 | 2606:4700:20::ac43:4812 21 | 2606:4700:20::681a:224 22 | 2606:4700:20::681a:324 23 | 2a03:2880:f11c:8083:face:b00c:0:25de 24 | 2606:4700:20::681a:d36 25 | 2606:4700:20::681a:c36 26 | 2606:4700:20::ac43:449d 27 | 2606:4700:20::681a:625 28 | 2606:4700:20::ac43:46bf 29 | 2606:4700:20::681a:725 30 | 2606:4700:20::ac43:47bb 31 | 2606:4700:20::681a:99c 32 | 2606:4700:20::681a:89c 33 | 2606:4700:3036::6815:fd4 34 | 2606:4700:3031::ac43:cf1a 35 | 2606:4700:10::ac43:1eab 36 | 2606:4700:10::6816:24f3 37 | 2606:4700:10::6816:25f3 38 | 2606:4700:3033::ac43:d17f 39 | 2606:4700:3031::6815:1748 40 | 2606:4700::6812:5ed 41 | 2606:4700::6812:4ed 42 | 2606:4700:20::681a:d8c 43 | 2606:4700:20::ac43:4bc2 44 | 2606:4700:20::681a:c8c 45 | 2606:4700:20::681a:439 46 | 2606:4700:20::ac43:477a 47 | 2606:4700:20::681a:539 48 | 2606:4700:3035::6815:5a4e 49 | 2606:4700:3037::ac43:99fd 50 | 2606:4700::6812:9b2a 51 | 2606:4700::6812:9a2a 52 | 2606:4700::6812:6a40 53 | 2606:4700::6812:6b40 54 | 2606:4700:20::681a:659 55 | 2606:4700:20::ac43:49d8 56 | 2606:4700:20::681a:759 57 | 2606:4700::6811:2569 58 | 2606:4700::6811:2469 59 | 2a03:2880:f12c:183:face:b00c:0:25de 60 | 2606:4700:3030::ac43:ae15 61 | 2606:4700:3036::6815:400a 62 | -------------------------------------------------------------------------------- /电脑使用PY/GFYMIP.txt: -------------------------------------------------------------------------------- 1 | 172.67.161.104 2 | 104.21.90.210 3 | 104.26.13.31 4 | 104.26.12.31 5 | 172.67.75.172 6 | 104.26.5.60 7 | 104.26.4.60 8 | 172.67.70.92 9 | 104.21.56.202 10 | 172.67.187.219 11 | 104.18.13.130 12 | 104.18.12.130 13 | 104.18.29.94 14 | 104.18.28.94 15 | 104.18.3.151 16 | 104.18.2.151 17 | 104.22.14.132 18 | 172.67.5.78 19 | 104.22.15.132 20 | 195.85.59.161 21 | 195.85.59.95 22 | 104.27.207.92 23 | 104.27.206.92 24 | 124.11.210.175 25 | 104.22.73.111 26 | 172.67.21.93 27 | 104.22.72.111 28 | 172.67.72.18 29 | 104.26.2.36 30 | 104.26.3.36 31 | 69.171.228.74 32 | 93.46.8.90 33 | 23.227.38.33 34 | 104.18.9.215 35 | 104.18.8.215 36 | 104.26.13.54 37 | 104.26.12.54 38 | 172.67.68.157 39 | 104.26.7.37 40 | 104.26.6.37 41 | 172.67.70.191 42 | 104.18.28.181 43 | 104.18.29.181 44 | 104.26.2.223 45 | 104.26.3.223 46 | 172.67.70.188 47 | 104.18.14.147 48 | 104.18.15.147 49 | 104.26.8.156 50 | 172.67.71.187 51 | 104.26.9.156 52 | 104.21.15.212 53 | 172.67.207.26 54 | 104.22.37.243 55 | 172.67.30.171 56 | 104.22.36.243 57 | 172.67.209.127 58 | 104.21.23.72 59 | 104.18.5.237 60 | 104.18.4.237 61 | 185.146.173.20 62 | 104.26.12.140 63 | 172.67.75.194 64 | 104.26.13.140 65 | 104.26.4.57 66 | 172.67.71.122 67 | 104.26.5.57 68 | 104.19.142.99 69 | 104.19.143.99 70 | 104.17.152.86 71 | 104.17.141.86 72 | 172.67.153.253 73 | 104.21.90.78 74 | 104.18.154.42 75 | 104.18.155.42 76 | 104.18.107.64 77 | 104.18.106.64 78 | 59.24.3.174 79 | 172.67.73.216 80 | 104.26.6.89 81 | 104.26.7.89 82 | 104.17.36.105 83 | 104.17.37.105 84 | 104.244.43.136 85 | 172.67.174.21 86 | 104.21.64.10 87 | 104.17.220.175 88 | 141.101.115.169 89 | 104.17.236.175 90 | 104.17.243.247 91 | 104.17.248.0 92 | 104.21.23.124 93 | 104.17.223.239 94 | 104.17.237.106 95 | 190.93.247.51 96 | 172.67.170.247 97 | 104.21.22.46 98 | 172.64.146.149 99 | 104.17.240.246 100 | 104.18.28.47 101 | 104.21.230.124 102 | 69.171.242.11 103 | 8.7.198.46 104 | 46.82.174.69 105 | 108.160.165.141 106 | 104.18.180.6 107 | 104.21.28.222 108 | 104.17.138.153 109 | 104.18.10.227 110 | 104.18.27.59 111 | 104.18.18.115 112 | 172.66.46.64 113 | 190.93.246.167 114 | 104.18.78.230 115 | 104.18.124.130 116 | 104.21.232.132 117 | 104.17.209.26 118 | 104.18.127.238 119 | 172.67.70.59 120 | 198.41.212.52 121 | -------------------------------------------------------------------------------- /电脑使用PY/GeoLite2-Country.mmdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/电脑使用PY/GeoLite2-Country.mmdb -------------------------------------------------------------------------------- /电脑使用PY/IDLE.reg: -------------------------------------------------------------------------------- 1 | Windows Registry Editor Version 5.00 2 | 3 | [HKEY_CLASSES_ROOT\SystemFileAssociations\.py] 4 | 5 | [HKEY_CLASSES_ROOT\SystemFileAssociations\.py\shell] 6 | 7 | [HKEY_CLASSES_ROOT\SystemFileAssociations\.py\shell\editwithidle] 8 | "MUIVerb"="&Edit with IDLE" 9 | "Subcommands"="" 10 | 11 | [HKEY_CLASSES_ROOT\SystemFileAssociations\.py\shell\editwithidle\shell] 12 | 13 | [HKEY_CLASSES_ROOT\SystemFileAssociations\.py\shell\editwithidle\shell\edit37] 14 | "MUIVerb"="Edit with IDLE 3.7" 15 | 16 | [HKEY_CLASSES_ROOT\SystemFileAssociations\.py\shell\editwithidle\shell\edit37\command] 17 | @="\"D:\\PY\\pythonw.exe\" -m idlelib \"%L\" %*" 18 | 19 | -------------------------------------------------------------------------------- /电脑使用PY/分类合并.py: -------------------------------------------------------------------------------- 1 | import csv 2 | import os 3 | 4 | # 获取当前目录路径 5 | current_directory = os.getcwd() 6 | 7 | # 定义常规端口和非常规端口列表 8 | regular_ports = ['80', '8080', '8880', '2052', '2082', '2086', '2095', '443', '2053', '2083', '2087', '2096', '8443'] 9 | 10 | # 保存匹配行的文件路径 11 | output_directory = os.path.join(current_directory, 'IP库') 12 | output_file_path_regular = os.path.join(output_directory, '常规端口.csv') 13 | output_file_path_non_regular = os.path.join(output_directory, '非常规端口.csv') 14 | 15 | # 创建输出目录 16 | os.makedirs(output_directory, exist_ok=True) 17 | 18 | # 定义标题行 19 | header = ['IP地址', '端口', 'TLS', '数据中心', '国家', '地区', '城市', 'ASN', 'ORG', '延迟(ms)', '速度(MB/s)'] 20 | 21 | # 打开要写入的文件,如果文件不存在则创建 22 | csv_file_regular = open(output_file_path_regular, 'a+', newline='', encoding='utf-8') 23 | csv_file_non_regular = open(output_file_path_non_regular, 'a+', newline='', encoding='utf-8') 24 | csv_writer_regular = csv.writer(csv_file_regular) 25 | csv_writer_non_regular = csv.writer(csv_file_non_regular) 26 | 27 | # 如果文件为空,写入标题行 28 | if os.stat(output_file_path_regular).st_size == 0: 29 | csv_writer_regular.writerow(header) 30 | 31 | if os.stat(output_file_path_non_regular).st_size == 0: 32 | csv_writer_non_regular.writerow(header) 33 | 34 | # 集合用于存储已处理的行,实现去重 35 | processed_rows = set() 36 | 37 | # 遍历当前目录下的所有.csv文件 38 | for file_name in os.listdir(current_directory): 39 | if file_name.endswith('.csv'): 40 | print(f"处理文件: {file_name}") 41 | with open(file_name, 'r', encoding='latin-1') as file: # 尝试使用latin-1编码格式 42 | csv_reader = csv.reader(file) 43 | next(csv_reader) # 跳过第一行 44 | data_rows = [row for row in csv_reader if len(row) == 11] 45 | 46 | # 按照 '速度(MB/s)' 从大到小排序 47 | # 按照 '速度(MB/s)' 从大到小排序 48 | sorted_data_rows = sorted([row for row in data_rows if row[10]], key=lambda x: float(x[10]), reverse=True) 49 | 50 | 51 | for row in sorted_data_rows: 52 | # 检查是否已处理过该行,避免重复写入 53 | row_key = tuple(row) 54 | if row_key not in processed_rows: 55 | processed_rows.add(row_key) 56 | if row[1] in regular_ports: 57 | csv_writer_regular.writerow(row) 58 | else: 59 | csv_writer_non_regular.writerow(row) 60 | 61 | # 关闭文件 62 | csv_file_regular.close() 63 | csv_file_non_regular.close() 64 | 65 | print("处理完成。") 66 | -------------------------------------------------------------------------------- /电脑使用PY/右键py脚本没有IDLE双击IDLE.reg.txt: -------------------------------------------------------------------------------- 1 | D:\\PY 2 | 3 | 这一段是我的 py的 安装文件夹 4 | 5 | 自行替换为自己的安装目录,把目录中的一个'\'换成两个'\\' 6 | 7 | 找安装目录 8 | 9 | 1.右键开始菜单 10 | 2.找到Python 11 | 3.右键IDLE 然后打开文件位置 12 | 4.在刚刚的文件夹继续右键IDLE 然后打开文件位置,新打开的文件夹就是安装目录。 -------------------------------------------------------------------------------- /电脑使用PY/合并CSV.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal enabledelayedexpansion 3 | set CSV_DIR=C:\Users\Administrator\Desktop\反代IP库 4 | cd /d %CSV_DIR% 5 | set FIRST_FILE=true 6 | (for %%G in (*.csv) do ( 7 | if !FIRST_FILE!==true ( 8 | < "%%G" ( 9 | set /p HEADER= 10 | echo !HEADER! 11 | ) 12 | set FIRST_FILE=false 13 | ) else ( 14 | more +1 "%%G" 15 | ) 16 | )) > addressescsv.csv 17 | echo CSV files have been merged successfully. 18 | @endlocal 19 | pause 20 | -------------------------------------------------------------------------------- /电脑使用PY/安装Python.txt: -------------------------------------------------------------------------------- 1 | Python下载地址 2 | 官网:https://www.python.org/downloads/release/python-3914/ 3 | 4 | 需要安装的库 (开代理下不了就关代理下) 5 | cmd或者shell 输入运行 6 | 7 | pip install PySocks 8 | 9 | Requests库:这个库用于发送HTTP请求。您可以使用pip安装这个库,运行以下命令 10 | pip install requests 11 | 12 | Socksipy库:这个库用于支持SOCKS代理。您可以使用pip安装这个库,运行以下命令: 13 | pip install SocksiPy-branch 14 | 15 | GeoIP2库:您需要安装geoip2库来处理IP地址的地理位置信息。您可以使用以下命令来安装: 16 | pip install geoip2 17 | 18 | Tkinter库:Tkinter是Python的标准GUI库,通常情况下应该已经随Python一起安装。如果您发现没有安装,您可以尝试安装: 19 | # 对于Python 3 20 | sudo apt-get install python3-tk 21 | 22 | Pandas库:Pandas是一个用于数据操作和分析的强大库,您可以使用以下命令安装: 23 | pip install pandas 24 | 25 | pip install PySocks 26 | 27 | 安装 chardet 模块。你可以尝试通过以下方式安装它: 28 | 29 | 使用 pip 命令安装:打开命令行界面,运行以下命令: 30 | 31 | pip install chardet 32 | 使用 conda 命令安装(如果你使用的是 Anaconda 环境):打开 Anaconda Prompt 或命令行界面,运行以下命令: 33 | 34 | conda install -c conda-forge chardet 35 | -------------------------------------------------------------------------------- /电脑使用PY/推荐使用IDLE运行,可以看到错误日志.txt: -------------------------------------------------------------------------------- 1 | 点击PY脚本,右键选择IDLE运行,然后点击run 或者快捷键F5 -------------------------------------------------------------------------------- /电脑使用PY/整理ip.txt库.py: -------------------------------------------------------------------------------- 1 | import re 2 | import tkinter as tk 3 | from tkinter import filedialog 4 | 5 | def remove_last_digit_and_underscore(text): 6 | # 删除每一行最后的数字和所有的下划线 7 | modified_lines = [] 8 | for line in text.split('\n'): 9 | modified_lines.append(re.sub(r'[\d_]+$', '', line.rstrip('\n'))) 10 | return '\n'.join(modified_lines) 11 | 12 | def remove_empty_lines(text): 13 | # 删除两行之间的空行 14 | modified_lines = [] 15 | for line in text.split('\n'): 16 | line = line.strip() 17 | if line: 18 | modified_lines.append(line) 19 | return '\n'.join(modified_lines) 20 | 21 | def add_number_after_hash(text): 22 | count_dict = {} 23 | text_dict = {} 24 | modified_lines = [] 25 | for line in text.split('\n'): 26 | match = re.search(r'#(.+)$', line) 27 | if match: 28 | text = match.group(1).strip() 29 | if text in text_dict: 30 | text_dict[text].append(line) 31 | else: 32 | text_dict[text] = [line] 33 | 34 | for text, lines in text_dict.items(): 35 | count_dict[text] = 0 36 | for line in lines: 37 | count_dict[text] += 1 38 | # 使用取余运算符确保数字在1到1000之间 39 | count = count_dict[text] % 1000 40 | if count == 0: 41 | count = 1000 42 | line = re.sub(r'#(.+)$', '#' + text + str(count), line) 43 | modified_lines.append(line.strip()) 44 | 45 | return '\n'.join(modified_lines) 46 | 47 | def remove_duplicate_ips(text): 48 | ips = set() # 使用集合来存储IP地址,确保唯一性 49 | deduplicated_lines = [] # 存储去重后的行 50 | 51 | # 使用正则表达式寻找每一行中的IP地址 52 | for line in text.split('\n'): 53 | # 提取IP地址 54 | ip_match = re.search(r'\b(?:\d{1,3}\.){3}\d{1,3}\b', line) 55 | if ip_match: 56 | ip = ip_match.group(0) 57 | # 检查IP地址是否已经出现过 58 | if ip not in ips: 59 | ips.add(ip) 60 | deduplicated_lines.append(line) 61 | 62 | return '\n'.join(deduplicated_lines) 63 | 64 | def process_file(file_path): 65 | # 读取文件内容 66 | with open(file_path, 'r', encoding='utf-8') as file: 67 | text = file.read() 68 | 69 | # 处理文本 70 | text = remove_last_digit_and_underscore(text) 71 | text = remove_empty_lines(text) 72 | text = remove_duplicate_ips(text) 73 | text = add_number_after_hash(text) 74 | 75 | # 将修改后的内容写回文件 76 | with open(file_path, 'w', encoding='utf-8') as file: 77 | file.write(text) 78 | 79 | def browse_file(): 80 | file_path = filedialog.askopenfilename() # 打开文件对话框,选择文件 81 | if file_path: 82 | process_file(file_path) 83 | status_label.config(text="File processed successfully.") 84 | 85 | # 创建主窗口 86 | root = tk.Tk() 87 | root.title("File Processor") 88 | 89 | # 创建按钮 90 | browse_button = tk.Button(root, text="Browse", command=browse_file) 91 | browse_button.pack(pady=10) 92 | 93 | # 创建状态标签 94 | status_label = tk.Label(root, text="") 95 | status_label.pack(pady=10) 96 | 97 | root.mainloop() 98 | -------------------------------------------------------------------------------- /电脑使用PY/自动扫描脚本.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import time 3 | 4 | # 定义 PowerShell 命令 5 | powershell_command_1 = "powershell.exe -Command \"ed iptest -a 45102 -c SIN -e=false\"" 6 | powershell_command_2 = "powershell.exe -Command \"ed iptest -a 45102 -c NRT -e=false\"" 7 | powershell_command_3 = "powershell.exe -Command \"ed iptest -a 45102 -c HKG -e=false\"" 8 | powershell_command_4 = "powershell.exe -Command \"ed iptest -a 40065 -e=false\"" 9 | powershell_command_5 = "powershell.exe -Command \"ed iptest -a 906 -e=false\"" 10 | powershell_command_6 = "powershell.exe -Command \"ed iptest -a 9312 -e=false\"" 11 | powershell_command_7 = "powershell.exe -Command \"ed iptest -a 932 -e=false\"" 12 | powershell_command_8 = "powershell.exe -Command \"ed iptest -a 967 -e=false\"" 13 | powershell_command_9 = "powershell.exe -Command \"ed iptest -a 3258 -e=false\"" 14 | powershell_command_10 = "powershell.exe -Command \"ed iptest -a 9808 -e=false\"" 15 | powershell_command_11 = "powershell.exe -Command \"ed iptest -a 16509 -e=false\"" 16 | powershell_command_12 = "powershell.exe -Command \"ed iptest -c SIN -e=false\"" 17 | powershell_command_13 = "powershell.exe -Command \"ed iptest -c NRT -e=false\"" 18 | powershell_command_14= "powershell.exe -Command \"ed iptest -c HKG -e=false\"" 19 | powershell_command_15= "powershell.exe -Command \"ed iptest -c TPE -e=false\"" 20 | 21 | # 执行第一个 PowerShell 命令 22 | try: 23 | subprocess.run(powershell_command_1, shell=True, check=True) 24 | print("第一个 PowerShell 程序执行成功!") 25 | except subprocess.CalledProcessError as e: 26 | print("第一个 PowerShell 程序执行失败:", e) 27 | 28 | # 等待 5 秒钟 29 | print("等待 5 秒钟...") 30 | time.sleep(10) 31 | 32 | # 执行第二个 PowerShell 命令 33 | try: 34 | subprocess.run(powershell_command_2, shell=True, check=True) 35 | print("第二个 PowerShell 程序执行成功!") 36 | except subprocess.CalledProcessError as e: 37 | print("第二个 PowerShell 程序执行失败:", e) 38 | 39 | # 等待 5 秒钟 40 | print("等待 5 秒钟...") 41 | time.sleep(10) 42 | 43 | # 执行第三个 PowerShell 命令 44 | try: 45 | subprocess.run(powershell_command_3, shell=True, check=True) 46 | print("第三个 PowerShell 程序执行成功!") 47 | except subprocess.CalledProcessError as e: 48 | print("第三个 PowerShell 程序执行失败:", e) 49 | 50 | # 等待 5 秒钟 51 | print("等待 5 秒钟...") 52 | time.sleep(10) 53 | 54 | # 执行第四个 PowerShell 命令 55 | try: 56 | subprocess.run(powershell_command_4, shell=True, check=True) 57 | print("第四个 PowerShell 程序执行成功!") 58 | except subprocess.CalledProcessError as e: 59 | print("第四个 PowerShell 程序执行失败:", e) 60 | 61 | # 等待 5 秒钟 62 | print("等待 5 秒钟...") 63 | time.sleep(10) 64 | 65 | # 执行第五个 PowerShell 命令 66 | try: 67 | subprocess.run(powershell_command_5, shell=True, check=True) 68 | print("第五个 PowerShell 程序执行成功!") 69 | except subprocess.CalledProcessError as e: 70 | print("第五个 PowerShell 程序执行失败:", e) 71 | 72 | # 等待 5 秒钟 73 | print("等待 5 秒钟...") 74 | time.sleep(10) 75 | 76 | # 执行第六个 PowerShell 命令 77 | try: 78 | subprocess.run(powershell_command_6, shell=True, check=True) 79 | print("第六个 PowerShell 程序执行成功!") 80 | except subprocess.CalledProcessError as e: 81 | print("第六个 PowerShell 程序执行失败:", e) 82 | 83 | # 等待 5 秒钟 84 | print("等待 5 秒钟...") 85 | time.sleep(10) 86 | 87 | # 执行第七个 PowerShell 命令 88 | try: 89 | subprocess.run(powershell_command_7, shell=True, check=True) 90 | print("第七个 PowerShell 程序执行成功!") 91 | except subprocess.CalledProcessError as e: 92 | print("第七个 PowerShell 程序执行失败:", e) 93 | 94 | # 等待 5 秒钟 95 | print("等待 5 秒钟...") 96 | time.sleep(10) 97 | 98 | # 执行第八个 PowerShell 命令 99 | try: 100 | subprocess.run(powershell_command_8, shell=True, check=True) 101 | print("第八个 PowerShell 程序执行成功!") 102 | except subprocess.CalledProcessError as e: 103 | print("第八个 PowerShell 程序执行失败:", e) 104 | 105 | # 等待 5 秒钟 106 | print("等待 5 秒钟...") 107 | time.sleep(10) 108 | 109 | # 执行第九个 PowerShell 命令 110 | try: 111 | subprocess.run(powershell_command_9, shell=True, check=True) 112 | print("第九个 PowerShell 程序执行成功!") 113 | except subprocess.CalledProcessError as e: 114 | print("第九个 PowerShell 程序执行失败:", e) 115 | 116 | # 等待 5 秒钟 117 | print("等待 5 秒钟...") 118 | time.sleep(10) 119 | 120 | # 执行第十个 PowerShell 命令 121 | try: 122 | subprocess.run(powershell_command_10, shell=True, check=True) 123 | print("第十个 PowerShell 程序执行成功!") 124 | except subprocess.CalledProcessError as e: 125 | print("第十个 PowerShell 程序执行失败:", e) 126 | 127 | # 等待 5 秒钟 128 | print("等待 5 秒钟...") 129 | time.sleep(10) 130 | 131 | # 执行第十一个 PowerShell 命令 132 | try: 133 | subprocess.run(powershell_command_11, shell=True, check=True) 134 | print("第十一个 PowerShell 程序执行成功!") 135 | except subprocess.CalledProcessError as e: 136 | print("第十一个 PowerShell 程序执行失败:", e) 137 | 138 | # 等待 5 秒钟 139 | print("等待 5 秒钟...") 140 | time.sleep(10) 141 | 142 | # 执行第十二个 PowerShell 命令 143 | try: 144 | subprocess.run(powershell_command_12, shell=True, check=True) 145 | print("第十二个 PowerShell 程序执行成功!") 146 | except subprocess.CalledProcessError as e: 147 | print("第十二个 PowerShell 程序执行失败:", e) 148 | 149 | # 等待 5 秒钟 150 | print("等待 5 秒钟...") 151 | time.sleep(10) 152 | 153 | # 执行第十三个 PowerShell 命令 154 | try: 155 | subprocess.run(powershell_command_13, shell=True, check=True) 156 | print("第十三个 PowerShell 程序执行成功!") 157 | except subprocess.CalledProcessError as e: 158 | print("第十三个 PowerShell 程序执行失败:", e) 159 | 160 | # 等待 5 秒钟 161 | print("等待 5 秒钟...") 162 | time.sleep(10) 163 | 164 | # 执行第十四个 PowerShell 命令 165 | try: 166 | subprocess.run(powershell_command_14, shell=True, check=True) 167 | print("第十四个 PowerShell 程序执行成功!") 168 | except subprocess.CalledProcessError as e: 169 | print("第十四个 PowerShell 程序执行失败:", e) 170 | 171 | # 等待 5 秒钟 172 | print("等待 5 秒钟...") 173 | time.sleep(10) 174 | 175 | # 执行第十五个 PowerShell 命令 176 | try: 177 | subprocess.run(powershell_command_15, shell=True, check=True) 178 | print("第十五个 PowerShell 程序执行成功!") 179 | except subprocess.CalledProcessError as e: 180 | print("第十五个 PowerShell 程序执行失败:", e) 181 | 182 | 183 | import os 184 | import shutil 185 | 186 | 187 | -------------------------------------------------------------------------------- /电脑使用PY/自动扫描脚本notls.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import time 3 | 4 | # 定义 PowerShell 命令 5 | powershell_command_1 = "powershell.exe -Command \"ed iptest -a 45102 -c SIN -e=false -t=false\"" 6 | powershell_command_2 = "powershell.exe -Command \"ed iptest -a 45102 -c NRT -e=false -t=false\"" 7 | powershell_command_3 = "powershell.exe -Command \"ed iptest -a 45102 -c HKG -e=false -t=false\"" 8 | powershell_command_4 = "powershell.exe -Command \"ed iptest -c SIN -e=false -t=false\"" 9 | powershell_command_5 = "powershell.exe -Command \"ed iptest -c NRT -e=false -t=false\"" 10 | powershell_command_6= "powershell.exe -Command \"ed iptest -c HKG -e=false -t=false\"" 11 | 12 | # 执行第一个 PowerShell 命令 13 | try: 14 | subprocess.run(powershell_command_1, shell=True, check=True) 15 | print("第一个 PowerShell 程序执行成功!") 16 | except subprocess.CalledProcessError as e: 17 | print("第一个 PowerShell 程序执行失败:", e) 18 | 19 | # 等待 5 秒钟 20 | print("等待 5 秒钟...") 21 | time.sleep(10) 22 | 23 | # 执行第二个 PowerShell 命令 24 | try: 25 | subprocess.run(powershell_command_2, shell=True, check=True) 26 | print("第二个 PowerShell 程序执行成功!") 27 | except subprocess.CalledProcessError as e: 28 | print("第二个 PowerShell 程序执行失败:", e) 29 | 30 | # 等待 5 秒钟 31 | print("等待 5 秒钟...") 32 | time.sleep(10) 33 | 34 | # 执行第三个 PowerShell 命令 35 | try: 36 | subprocess.run(powershell_command_3, shell=True, check=True) 37 | print("第三个 PowerShell 程序执行成功!") 38 | except subprocess.CalledProcessError as e: 39 | print("第三个 PowerShell 程序执行失败:", e) 40 | 41 | # 等待 5 秒钟 42 | print("等待 5 秒钟...") 43 | time.sleep(10) 44 | 45 | # 执行第四个 PowerShell 命令 46 | try: 47 | subprocess.run(powershell_command_4, shell=True, check=True) 48 | print("第四个 PowerShell 程序执行成功!") 49 | except subprocess.CalledProcessError as e: 50 | print("第四个 PowerShell 程序执行失败:", e) 51 | 52 | # 等待 5 秒钟 53 | print("等待 5 秒钟...") 54 | time.sleep(10) 55 | 56 | # 执行第五个 PowerShell 命令 57 | try: 58 | subprocess.run(powershell_command_5, shell=True, check=True) 59 | print("第五个 PowerShell 程序执行成功!") 60 | except subprocess.CalledProcessError as e: 61 | print("第五个 PowerShell 程序执行失败:", e) 62 | 63 | # 等待 5 秒钟 64 | print("等待 5 秒钟...") 65 | time.sleep(10) 66 | 67 | # 执行第六个 PowerShell 命令 68 | try: 69 | subprocess.run(powershell_command_6, shell=True, check=True) 70 | print("第六个 PowerShell 程序执行成功!") 71 | except subprocess.CalledProcessError as e: 72 | print("第六个 PowerShell 程序执行失败:", e) 73 | 74 | 75 | import os 76 | import shutil 77 | 78 | 79 | -------------------------------------------------------------------------------- /电脑使用PY/!脚本需要安装什么东西才可以运行,自己复制到ai,他会告诉你!.txt: -------------------------------------------------------------------------------- 1 | !脚本需要安装什么东西才可以运行,自己复制到ai,他会告诉你! 2 | 压缩包内发了 3 | 4 | 1-0 是下载https://zip.baipiao.eu.org这个网站的文件。如果获取失败,科学上网,手动下载然后粘贴到和脚本同目录的文件夹,解压!! 5 | 6 | 1-1 是获取https://ipdb.api.030101.xyz/?type=proxy这个网站的IP。如果获取失败,科学上网,手动复制然后粘贴到一个叫proxy.txt的文本中。和脚本同目录!! 7 | 8 | 【我这里是加了个本地socks5代理,可以自己修改。比如clash verge的端口是7897你就改成127.0.0:7897,以此类推。】 9 | 10 | 1-2 是获取几个域名的dns记录,都是反代ip 11 | 12 | 1-3 是获取几个域名的dns记录,都是官方ip!(这个没必要识别地区。) 13 | 14 | 不用每个都用,推荐就用1-1算了,这个ip最多 15 | 16 | 2-1 是识别国家地区,然后整合到一个和源文件名字相同文件夹中。(如果你把上面都运行了一遍,可以不用关闭脚本,直接一个个选择识别了。) 17 | 18 | 2-2 是读取这个目录以及子目录的以国家地区命名文本,名字一样的合并到一个叫做"合并"的文件夹中,没什么用。强烈推荐只用1-1就行了!! 19 | 20 | 3-0 是测速的py脚本,在当前目录中扫描到了哪些文本,后面就显示哪些文本按钮。 21 | 根据你的选择执行cmd指令。先复制到脚本目录。 22 | (我设定了'HK.txt', 'KR.txt', 'SG.txt', 'US.txt', 'TW.txt', 'AE.txt', 'US.txt', 'DE.txt', 'JP.txt', 'CA.txt', 'CH.txt', 'GB.txt', 'IN.txt', 'IT.txt', 'NL.txt', 'BG.txt', 'FR.txt', 'DK.txt', 'PH.txt', 'SE.txt', 'CN.txt', 'ID.txt'),可以自己编辑。 23 | 24 | 4-0 是表格转格式。(转换之前记得打开下CSV表格点击保存,会弹出一个窗口,点击:是) 25 | 你测速用的哪个端口就填写那个端口,#后面加上你的备注 26 | 27 | 4-1 比如3K之类的付费的IP库生成的CSV文档,这个文档的格式和自己测速生成的格式不同。(不做过多解释) 28 | 29 | 30 | 步骤: 31 | 第1步 获取反代IP信息 32 | 33 | 第2步 识别国家地区 34 | 35 | 第3步 测速 36 | 37 | 第4步 把表格转格式 38 | 39 | 第5步 提前准备好一个txt文本,需要的ip信息复制进去,上传到kv空间或者其他地方。 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /群友X发的提取vless/CF-IP/GeoLite2-Country.mmdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/群友X发的提取vless/CF-IP/GeoLite2-Country.mmdb -------------------------------------------------------------------------------- /群友X发的提取vless/CF-IP/IP库/1.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/群友X发的提取vless/CF-IP/IP库/1.csv -------------------------------------------------------------------------------- /群友X发的提取vless/CF-IP/SG.txt: -------------------------------------------------------------------------------- 1 | 47.245.113.31:56182#SG_1 2 | -------------------------------------------------------------------------------- /群友X发的提取vless/CF-IP/X大佬 的新的白嫖IP的办法.md: -------------------------------------------------------------------------------- 1 | # `X大佬` 的新的白嫖IP的办法 2 | 3 | 1. 去下载大佬们分享的CSV文件,放到IP库这个文件夹。**TG群里面有** 4 | 5 | 2. **检查csv的格式**,如果不是UTF-8,右键以文本方式打开,另存为,下拉选择UTF-8。 6 | 7 | 3. 右键编辑`cf-ip.py`,替换里面的字符 8 | 9 | 4. 使用***X大佬***的`cf-ip.py`,会把下载好的CSV文件 **测试处理** 按照**端口和非标端口**区分存放到data目录。 10 | 11 | 5. data目录下会出现几个文件。 12 | 13 | 根据脚本的逻辑,脚本会生成以下6个文件: 14 | 15 | - 两个包含非常规端口IP地址和端口信息的文本文件:`irp_{suffix}.txt` (irregular_ports_filename) 16 | - 两个包含常规端口IP地址和端口信息的文本文件:`rp_{suffix}.txt` (regular_ports_filename) 17 | - 两个包含vless格式的IP地址和端口信息的文本文件:`vless_ir_{today}.txt` 和 `vless_r_{today}.txt` 18 | 19 | 6. 有两个**vless开头的文本**,可以直接复制节点到v2或者nekobox上使用了, 20 | 21 | 7. 想放到你的ip库.txt的话,复制**两个ip和rip开头的文本**里面的内容。 22 | 23 | 8. 如果想用两个包含非常规端口IP地址和端口信息的文本文件,但是又想加上**#国家**,那就麻烦一点了。 24 | 25 | 要把文本内容复制到根目录的cf-vless.txt中,`一键提取vless-ip端口,识别国家.py`再次识别国家,然后复制出来到脚本目录,双击 26 | 27 | `加上后缀.py`就可以了。主要是我只会这样操作 -------------------------------------------------------------------------------- /群友X发的提取vless/CF-IP/bin/cfiptest.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/群友X发的提取vless/CF-IP/bin/cfiptest.exe -------------------------------------------------------------------------------- /群友X发的提取vless/CF-IP/cf-ip.py: -------------------------------------------------------------------------------- 1 | import os 2 | import subprocess 3 | from datetime import datetime 4 | from typing import Tuple 5 | 6 | import pandas as pd 7 | 8 | REGULAR_PORTS = [ 9 | 80, 10 | 443, 11 | 2052, 12 | 2053, 13 | 2082, 14 | 2083, 15 | 2086, 16 | 2087, 17 | 2095, 18 | 2096, 19 | 8080, 20 | 8443, 21 | 8880, 22 | ] 23 | ROOT_PATH = "你的CSV文件目录 在?/IP库" 24 | UUID = "UUID" 25 | HOST = "你的节点的域名" 26 | 27 | 28 | def csv2vless(input_filename: str, output_filename: str) -> None: 29 | df = pd.read_csv(input_filename) 30 | vless_strs = [] 31 | for _, row in df.iterrows(): 32 | ip = row["IP地址"] 33 | port = row["端口"] 34 | dc = row["数据中心"] 35 | city = row["城市"] 36 | vless = f"vless://{UUID}@{ip}:{port}?encryption=none&security=tls&sni={HOST}&fp=random&type=ws&host={HOST}&path=/?ed=2560#{dc} | {city}" 37 | vless_strs.append(vless) 38 | 39 | if vless_strs: 40 | with open(output_filename, "w", encoding="utf-8") as f: 41 | f.write("\n".join(vless_strs)) 42 | 43 | 44 | # csv2vless('./data/ip.csv', "./data/vless.txt") 45 | 46 | 47 | def ip_test(input_filename: str, output_filename: str) -> None: 48 | subprocess.run( 49 | f"./bin/cfiptest.exe -f {input_filename} -st 0 -maxdc 100000 -o {output_filename}", 50 | check=True, 51 | ) 52 | 53 | 54 | # ip_test("./data/ip.txt", "./data/output.csv") 55 | def csv2ip(root: str, suffix: str) -> Tuple[str, str]: 56 | csv_files = [file for file in os.listdir(root) if file.endswith(".csv")] 57 | 58 | df_list = [] 59 | for f in csv_files: 60 | df = pd.read_csv(os.path.join(root, f)) 61 | df = df[df["TLS"]] 62 | new_df = df.loc[:, ["IP地址", "端口"]] 63 | df_list.append(new_df) 64 | 65 | combined_df = pd.concat(df_list, ignore_index=True) 66 | combined_df.sort_values(by=["IP地址", "端口"], inplace=True) 67 | combined_df.drop_duplicates(subset=["IP地址", "端口"], keep="first", inplace=True) 68 | 69 | # 区分常规端口和非常规端口 70 | irregular_port_df = combined_df[~combined_df["端口"].isin(REGULAR_PORTS)] 71 | combined_df = combined_df[combined_df["端口"].isin(REGULAR_PORTS)] 72 | irregular_port_df.reset_index(drop=True, inplace=True) 73 | combined_df.reset_index(drop=True, inplace=True) 74 | 75 | irregular_ports_filename = f"irp_{suffix}.txt" 76 | regular_ports_filename = f"rp_{suffix}.txt" 77 | 78 | ir_ip_pairs = [ 79 | f'{row["IP地址"]}:{row["端口"]}' for _, row in irregular_port_df.iterrows() 80 | ] 81 | ip_pairs = [f'{row["IP地址"]}:{row["端口"]}' for _, row in combined_df.iterrows()] 82 | 83 | with open( 84 | os.path.join("./data", irregular_ports_filename), "w", encoding="utf-8" 85 | ) as ir_f: 86 | ir_f.write("\n".join(ir_ip_pairs)) 87 | with open( 88 | os.path.join("./data", regular_ports_filename), "w", encoding="utf-8" 89 | ) as reg_f: 90 | reg_f.write("\n".join(ip_pairs)) 91 | 92 | return irregular_ports_filename, regular_ports_filename 93 | 94 | 95 | if __name__ == "__main__": 96 | today = f"{datetime.now():%Y%m%d}" 97 | ir, r = csv2ip(ROOT_PATH, suffix=today) 98 | 99 | ip_test(f"./data/{ir}", f"./data/ir_{today}.csv") 100 | ip_test(f"./data/{r}", f"./data/r_{today}.csv") 101 | 102 | csv2vless(f"./data/ir_{today}.csv", f"./data/vless_ir_{today}.txt") 103 | csv2vless(f"./data/r_{today}.csv", f"./data/vless_r_{today}.txt") 104 | -------------------------------------------------------------------------------- /群友X发的提取vless/CF-IP/data/新建文本文档.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/群友X发的提取vless/CF-IP/data/新建文本文档.txt -------------------------------------------------------------------------------- /群友X发的提取vless/CF-IP/locations.json: -------------------------------------------------------------------------------- 1 | [{"iata":"TIA","lat":41.4146995544,"lon":19.7206001282,"cca2":"AL","region":"Europe","city":"Tirana"},{"iata":"ALG","lat":36.6910018921,"lon":3.2154099941,"cca2":"DZ","region":"Africa","city":"Algiers"},{"iata":"AAE","lat":36.85596,"lon":7.79207,"cca2":"DZ","region":"Africa","city":"Annaba"},{"iata":"ORN","lat":35.6911,"lon":-0.6416,"cca2":"DZ","region":"Africa","city":"Oran"},{"iata":"LAD","lat":-8.8583698273,"lon":13.2312002182,"cca2":"AO","region":"Africa","city":"Luanda"},{"iata":"EZE","lat":-34.8222,"lon":-58.5358,"cca2":"AR","region":"South America","city":"Buenos Aires"},{"iata":"COR","lat":-31.31,"lon":-64.208333,"cca2":"AR","region":"South America","city":"Córdoba"},{"iata":"NQN","lat":-38.9490013123,"lon":-68.1557006836,"cca2":"AR","region":"South America","city":"Neuquen"},{"iata":"EVN","lat":40.1473007202,"lon":44.3959007263,"cca2":"AM","region":"Middle East","city":"Yerevan"},{"iata":"ADL","lat":-34.9431729,"lon":138.5335637,"cca2":"AU","region":"Oceania","city":"Adelaide"},{"iata":"BNE","lat":-27.3841991425,"lon":153.117004394,"cca2":"AU","region":"Oceania","city":"Brisbane"},{"iata":"CBR","lat":-35.3069000244,"lon":149.1950073242,"cca2":"AU","region":"Oceania","city":"Canberra"},{"iata":"HBA","lat":-42.883209,"lon":147.331665,"cca2":"AU","region":"Oceania","city":"Hobart"},{"iata":"MEL","lat":-37.6733016968,"lon":144.843002319,"cca2":"AU","region":"Oceania","city":"Melbourne"},{"iata":"PER","lat":-31.9402999878,"lon":115.967002869,"cca2":"AU","region":"Oceania","city":"Perth"},{"iata":"SYD","lat":-33.9460983276,"lon":151.177001953,"cca2":"AU","region":"Oceania","city":"Sydney"},{"iata":"VIE","lat":48.1102981567,"lon":16.5697002411,"cca2":"AT","region":"Europe","city":"Vienna"},{"iata":"LLK","lat":38.7463989258,"lon":48.8180007935,"cca2":"AZ","region":"Middle East","city":"Astara"},{"iata":"GYD","lat":40.4674987793,"lon":50.0466995239,"cca2":"AZ","region":"Middle East","city":"Baku"},{"iata":"BAH","lat":26.2707996368,"lon":50.6335983276,"cca2":"BH","region":"Middle East","city":"Manama"},{"iata":"CGP","lat":22.2495995,"lon":91.8133011,"cca2":"BD","region":"Asia Pacific","city":"Chittagong"},{"iata":"DAC","lat":23.843347,"lon":90.397783,"cca2":"BD","region":"Asia Pacific","city":"Dhaka"},{"iata":"JSR","lat":23.1837997437,"lon":89.1607971191,"cca2":"BD","region":"Asia Pacific","city":"Jashore"},{"iata":"BGI","lat":13.103562,"lon":-59.603226,"cca2":"BB","region":"North America","city":"Bridgetown"},{"iata":"MSQ","lat":53.9006,"lon":27.599,"cca2":"BY","region":"Europe","city":"Minsk"},{"iata":"BRU","lat":50.9014015198,"lon":4.4844398499,"cca2":"BE","region":"Europe","city":"Brussels"},{"iata":"PBH","lat":27.4712,"lon":89.6339,"cca2":"BT","region":"Asia Pacific","city":"Thimphu"},{"iata":"LPB","lat":-16.4897,"lon":-68.1193,"cca2":"BO","region":"South America","city":"La Paz"},{"iata":"GBE","lat":-24.6282,"lon":25.9231,"cca2":"BW","region":"Africa","city":"Gaborone"},{"iata":"QWJ","lat":-22.738,"lon":-47.334,"cca2":"BR","region":"South America","city":"Americana"},{"iata":"BEL","lat":-1.4563,"lon":-48.5013,"cca2":"BR","region":"South America","city":"Belém"},{"iata":"CNF","lat":-19.624444,"lon":-43.971944,"cca2":"BR","region":"South America","city":"Belo Horizonte"},{"iata":"BNU","lat":-26.89245,"lon":-49.07696,"cca2":"BR","region":"South America","city":"Blumenau"},{"iata":"BSB","lat":-15.79824,"lon":-47.90859,"cca2":"BR","region":"South America","city":"Brasilia"},{"iata":"CFC","lat":-26.7762,"lon":-51.0125,"cca2":"BR","region":"South America","city":"Cacador"},{"iata":"VCP","lat":-22.90662,"lon":-47.08576,"cca2":"BR","region":"South America","city":"Campinas"},{"iata":"CAW","lat":-21.698299408,"lon":-41.301700592,"cca2":"BR","region":"South America","city":"Campos dos Goytacazes"},{"iata":"XAP","lat":-27.1341991425,"lon":-52.6566009521,"cca2":"BR","region":"South America","city":"Chapeco"},{"iata":"CGB","lat":-15.59611,"lon":-56.09667,"cca2":"BR","region":"South America","city":"Cuiaba"},{"iata":"CWB","lat":-25.5284996033,"lon":-49.1758003235,"cca2":"BR","region":"South America","city":"Curitiba"},{"iata":"FLN","lat":-27.6702785492,"lon":-48.5525016785,"cca2":"BR","region":"South America","city":"Florianopolis"},{"iata":"FOR","lat":-3.7762799263,"lon":-38.5326004028,"cca2":"BR","region":"South America","city":"Fortaleza"},{"iata":"GYN","lat":-16.69727,"lon":-49.26851,"cca2":"BR","region":"South America","city":"Goiania"},{"iata":"ITJ","lat":-27.6116676331,"lon":-48.6727790833,"cca2":"BR","region":"South America","city":"Itajai"},{"iata":"JOI","lat":-26.304408,"lon":-48.846383,"cca2":"BR","region":"South America","city":"Joinville"},{"iata":"JDO","lat":-7.2242,"lon":-39.313,"cca2":"BR","region":"South America","city":"Juazeiro do Norte"},{"iata":"MAO","lat":-3.11286,"lon":-60.01949,"cca2":"BR","region":"South America","city":"Manaus"},{"iata":"POA","lat":-29.9944000244,"lon":-51.1713981628,"cca2":"BR","region":"South America","city":"Porto Alegre"},{"iata":"REC","lat":-8.1264896393,"lon":-34.9235992432,"cca2":"BR","region":"South America","city":"Recife"},{"iata":"RAO","lat":-21.1363887787,"lon":-47.7766685486,"cca2":"BR","region":"South America","city":"Ribeirao Preto"},{"iata":"GIG","lat":-22.8099994659,"lon":-43.2505569458,"cca2":"BR","region":"South America","city":"Rio de Janeiro"},{"iata":"SSA","lat":-12.9086112976,"lon":-38.3224983215,"cca2":"BR","region":"South America","city":"Salvador"},{"iata":"SJP","lat":-20.807157,"lon":-49.378994,"cca2":"BR","region":"South America","city":"São José do Rio Preto"},{"iata":"SJK","lat":-23.1791,"lon":-45.8872,"cca2":"BR","region":"South America","city":"São José dos Campos"},{"iata":"GRU","lat":-23.4355564117,"lon":-46.4730567932,"cca2":"BR","region":"South America","city":"São Paulo"},{"iata":"SOD","lat":-23.54389,"lon":-46.63445,"cca2":"BR","region":"South America","city":"Sorocaba"},{"iata":"NVT","lat":-26.8251,"lon":-49.2695,"cca2":"BR","region":"South America","city":"Timbo"},{"iata":"UDI","lat":-18.8836116791,"lon":-48.225276947,"cca2":"BR","region":"South America","city":"Uberlandia"},{"iata":"VIX","lat":-20.64871,"lon":-41.90857,"cca2":"BR","region":"South America","city":"Vitoria"},{"iata":"BWN","lat":4.903052,"lon":114.939819,"cca2":"BN","region":"Asia Pacific","city":"Bandar Seri Begawan"},{"iata":"SOF","lat":42.6966934204,"lon":23.4114360809,"cca2":"BG","region":"Europe","city":"Sofia"},{"iata":"OUA","lat":12.3531999588,"lon":-1.5124200583,"cca2":"BF","region":"Africa","city":"Ouagadougou"},{"iata":"PNH","lat":11.5466003418,"lon":104.84400177,"cca2":"KH","region":"Asia Pacific","city":"Phnom Penh"},{"iata":"YYC","lat":51.113899231,"lon":-114.019996643,"cca2":"CA","region":"North America","city":"Calgary"},{"iata":"YVR","lat":49.193901062,"lon":-123.183998108,"cca2":"CA","region":"North America","city":"Vancouver"},{"iata":"YWG","lat":49.9099998474,"lon":-97.2398986816,"cca2":"CA","region":"North America","city":"Winnipeg"},{"iata":"YHZ","lat":44.64601,"lon":-63.66844,"cca2":"CA","region":"North America","city":"Halifax"},{"iata":"YOW","lat":45.3224983215,"lon":-75.6691970825,"cca2":"CA","region":"North America","city":"Ottawa"},{"iata":"YYZ","lat":43.6772003174,"lon":-79.6305999756,"cca2":"CA","region":"North America","city":"Toronto"},{"iata":"YUL","lat":45.4706001282,"lon":-73.7407989502,"cca2":"CA","region":"North America","city":"Montréal"},{"iata":"YXE","lat":52.1707992554,"lon":-106.699996948,"cca2":"CA","region":"North America","city":"Saskatoon"},{"iata":"ARI","lat":-18.348611,"lon":-70.338889,"cca2":"CL","region":"South America","city":"Arica"},{"iata":"SCL","lat":-33.3930015564,"lon":-70.7857971191,"cca2":"CL","region":"South America","city":"Santiago"},{"iata":"BOG","lat":4.70159,"lon":-74.1469,"cca2":"CO","region":"South America","city":"Bogotá"},{"iata":"MDE","lat":6.16454,"lon":-75.4231,"cca2":"CO","region":"South America","city":"Medellín"},{"iata":"FIH","lat":-4.3857498169,"lon":15.4446001053,"cca2":"CD","region":"Africa","city":"Kinshasa"},{"iata":"SJO","lat":9.9938602448,"lon":-84.2088012695,"cca2":"CR","region":"South America","city":"San José"},{"iata":"ZAG","lat":45.7429008484,"lon":16.0687999725,"cca2":"HR","region":"Europe","city":"Zagreb"},{"iata":"CUR","lat":12.1888999939,"lon":-68.9598007202,"cca2":"CW","region":"North America","city":"Willemstad"},{"iata":"LCA","lat":34.8750991821,"lon":33.6249008179,"cca2":"CY","region":"Europe","city":"Nicosia"},{"iata":"PRG","lat":50.1007995605,"lon":14.2600002289,"cca2":"CZ","region":"Europe","city":"Prague"},{"iata":"CPH","lat":55.6179008484,"lon":12.6560001373,"cca2":"DK","region":"Europe","city":"Copenhagen"},{"iata":"JIB","lat":11.5473003387,"lon":43.1595001221,"cca2":"DJ","region":"Africa","city":"Djibouti"},{"iata":"STI","lat":19.4060993195,"lon":-70.6046981812,"cca2":"DO","region":"North America","city":"Santiago de los Caballeros"},{"iata":"SDQ","lat":18.4297008514,"lon":-69.6688995361,"cca2":"DO","region":"North America","city":"Santo Domingo"},{"iata":"GYE","lat":-2.1894,"lon":-79.8891,"cca2":"EC","region":"South America","city":"Guayaquil"},{"iata":"UIO","lat":-0.1291666667,"lon":-78.3575,"cca2":"EC","region":"South America","city":"Quito"},{"iata":"CAI","lat":30.1219005585,"lon":31.4055995941,"cca2":"EG","region":"Africa","city":"Cairo"},{"iata":"TLL","lat":59.4132995605,"lon":24.8327999115,"cca2":"EE","region":"Europe","city":"Tallinn"},{"iata":"SUV","lat":-18.11319,"lon":178.43859,"cca2":"FJ","region":"Oceania","city":"Suva"},{"iata":"HEL","lat":60.317199707,"lon":24.963300705,"cca2":"FI","region":"Europe","city":"Helsinki"},{"iata":"BOD","lat":44.82946,"lon":-0.58355,"cca2":"FR","region":"Europe","city":"Bordeaux"},{"iata":"LYS","lat":45.7263,"lon":5.0908,"cca2":"FR","region":"Europe","city":"Lyon"},{"iata":"MRS","lat":43.439271922,"lon":5.2214241028,"cca2":"FR","region":"Europe","city":"Marseille"},{"iata":"CDG","lat":49.0127983093,"lon":2.5499999523,"cca2":"FR","region":"Europe","city":"Paris"},{"iata":"PPT","lat":-17.5536994934,"lon":-149.606994629,"cca2":"PF","region":"Oceania","city":"Tahiti"},{"iata":"TBS","lat":41.6692008972,"lon":44.95470047,"cca2":"GE","region":"Europe","city":"Tbilisi"},{"iata":"TXL","lat":52.5597000122,"lon":13.2876996994,"cca2":"DE","region":"Europe","city":"Berlin"},{"iata":"DUS","lat":51.2895011902,"lon":6.7667798996,"cca2":"DE","region":"Europe","city":"Düsseldorf"},{"iata":"FRA","lat":50.0264015198,"lon":8.543129921,"cca2":"DE","region":"Europe","city":"Frankfurt"},{"iata":"HAM","lat":53.6304016113,"lon":9.9882297516,"cca2":"DE","region":"Europe","city":"Hamburg"},{"iata":"MUC","lat":48.3538017273,"lon":11.7861003876,"cca2":"DE","region":"Europe","city":"Munich"},{"iata":"STR","lat":48.783333,"lon":9.183333,"cca2":"DE","region":"Europe","city":"Stuttgart"},{"iata":"ACC","lat":5.614818,"lon":-0.205874,"cca2":"GH","region":"Africa","city":"Accra"},{"iata":"ATH","lat":37.9364013672,"lon":23.9444999695,"cca2":"GR","region":"Europe","city":"Athens"},{"iata":"SKG","lat":40.5196990967,"lon":22.9708995819,"cca2":"GR","region":"Europe","city":"Thessaloniki"},{"iata":"GND","lat":12.007116,"lon":-61.7882288,"cca2":"GD","region":"South America","city":"St. George's"},{"iata":"GUM","lat":13.4834003448,"lon":144.796005249,"cca2":"GU","region":"Asia Pacific","city":"Hagatna"},{"iata":"GUA","lat":14.5832996368,"lon":-90.5274963379,"cca2":"GT","region":"North America","city":"Guatemala City"},{"iata":"GEO","lat":6.825648,"lon":-58.163756,"cca2":"GY","region":"South America","city":"Georgetown"},{"iata":"PAP","lat":18.5799999237,"lon":-72.2925033569,"cca2":"HT","region":"North America","city":"Port-au-Prince"},{"iata":"TGU","lat":14.0608,"lon":-87.2172,"cca2":"HN","region":"South America","city":"Tegucigalpa"},{"iata":"HKG","lat":22.3089008331,"lon":113.915000916,"cca2":"HK","region":"Asia Pacific","city":"Hong Kong"},{"iata":"BUD","lat":47.4369010925,"lon":19.2555999756,"cca2":"HU","region":"Europe","city":"Budapest"},{"iata":"KEF","lat":63.9850006104,"lon":-22.6056003571,"cca2":"IS","region":"Europe","city":"Reykjavík"},{"iata":"AMD","lat":23.0225,"lon":72.5714,"cca2":"IN","region":"Asia Pacific","city":"Ahmedabad"},{"iata":"BLR","lat":13.7835719,"lon":76.6165937,"cca2":"IN","region":"Asia Pacific","city":"Bangalore"},{"iata":"BBI","lat":20.2961,"lon":85.8245,"cca2":"IN","region":"Asia Pacific","city":"Bhubaneswar"},{"iata":"IXC","lat":30.673500061,"lon":76.7884979248,"cca2":"IN","region":"Asia Pacific","city":"Chandigarh"},{"iata":"MAA","lat":12.9900054932,"lon":80.1692962646,"cca2":"IN","region":"Asia Pacific","city":"Chennai"},{"iata":"HYD","lat":17.2313175201,"lon":78.4298553467,"cca2":"IN","region":"Asia Pacific","city":"Hyderabad"},{"iata":"CNN","lat":11.915858,"lon":75.55094,"cca2":"IN","region":"Asia Pacific","city":"Kannur"},{"iata":"KNU","lat":26.4499,"lon":80.3319,"cca2":"IN","region":"Asia Pacific","city":"Kanpur"},{"iata":"COK","lat":9.9312,"lon":76.2673,"cca2":"IN","region":"Asia Pacific","city":"Kochi"},{"iata":"CCU","lat":22.6476933,"lon":88.4349249,"cca2":"IN","region":"Asia Pacific","city":"Kolkata"},{"iata":"BOM","lat":19.0886993408,"lon":72.8678970337,"cca2":"IN","region":"Asia Pacific","city":"Mumbai"},{"iata":"NAG","lat":21.1610714,"lon":79.0024702,"cca2":"IN","region":"Asia Pacific","city":"Nagpur"},{"iata":"DEL","lat":28.5664997101,"lon":77.1031036377,"cca2":"IN","region":"Asia Pacific","city":"New Delhi"},{"iata":"PAT","lat":25.591299057,"lon":85.0879974365,"cca2":"IN","region":"Asia Pacific","city":"Patna"},{"iata":"DPS","lat":-8.748169899,"lon":115.1669998169,"cca2":"ID","region":"Asia Pacific","city":"Denpasar"},{"iata":"CGK","lat":-6.1275229,"lon":106.6515118,"cca2":"ID","region":"Asia Pacific","city":"Jakarta"},{"iata":"JOG","lat":-7.7881798744,"lon":110.4319992065,"cca2":"ID","region":"Asia Pacific","city":"Yogyakarta"},{"iata":"BGW","lat":33.2625007629,"lon":44.2346000671,"cca2":"IQ","region":"Middle East","city":"Baghdad"},{"iata":"BSR","lat":30.5491008759,"lon":47.6621017456,"cca2":"IQ","region":"Middle East","city":"Basra"},{"iata":"EBL","lat":36.1901,"lon":43.993,"cca2":"IQ","region":"Middle East","city":"Erbil"},{"iata":"NJF","lat":31.989722,"lon":44.404167,"cca2":"IQ","region":"Middle East","city":"Najaf"},{"iata":"XNH","lat":30.9358005524,"lon":46.0900993347,"cca2":"IQ","region":"Middle East","city":"Nasiriyah"},{"iata":"ISU","lat":35.5668,"lon":45.4161,"cca2":"IQ","region":"Middle East","city":"Sulaymaniyah"},{"iata":"ORK","lat":51.8413009644,"lon":-8.491109848,"cca2":"IE","region":"Europe","city":"Cork"},{"iata":"DUB","lat":53.4212989807,"lon":-6.270070076,"cca2":"IE","region":"Europe","city":"Dublin"},{"iata":"HFA","lat":32.78492,"lon":34.96069,"cca2":"IL","region":"Middle East","city":"Haifa"},{"iata":"TLV","lat":32.0113983154,"lon":34.8866996765,"cca2":"IL","region":"Middle East","city":"Tel Aviv"},{"iata":"MXP","lat":45.6305999756,"lon":8.7281103134,"cca2":"IT","region":"Europe","city":"Milan"},{"iata":"PMO","lat":38.16114,"lon":13.31546,"cca2":"IT","region":"Europe","city":"Palermo"},{"iata":"FCO","lat":41.8045005798,"lon":12.2508001328,"cca2":"IT","region":"Europe","city":"Rome"},{"iata":"KIN","lat":17.9951,"lon":-76.7846,"cca2":"JM","region":"North America","city":"Kingston"},{"iata":"FUK","lat":33.5902,"lon":130.4017,"cca2":"JP","region":"Asia Pacific","city":"Fukuoka"},{"iata":"OKA","lat":26.1958,"lon":127.646,"cca2":"JP","region":"Asia Pacific","city":"Naha"},{"iata":"KIX","lat":34.4272994995,"lon":135.244003296,"cca2":"JP","region":"Asia Pacific","city":"Osaka"},{"iata":"NRT","lat":35.7647018433,"lon":140.386001587,"cca2":"JP","region":"Asia Pacific","city":"Tokyo"},{"iata":"AMM","lat":31.7226009369,"lon":35.9931983948,"cca2":"JO","region":"Middle East","city":"Amman"},{"iata":"ALA","lat":43.3521003723,"lon":77.0404968262,"cca2":"KZ","region":"Asia Pacific","city":"Almaty"},{"iata":"MBA","lat":-4.0348300934,"lon":39.5942001343,"cca2":"KE","region":"Africa","city":"Mombasa"},{"iata":"NBO","lat":-1.319239974,"lon":36.9277992249,"cca2":"KE","region":"Africa","city":"Nairobi"},{"iata":"ICN","lat":37.4691009521,"lon":126.450996399,"cca2":"KR","region":"Asia Pacific","city":"Seoul"},{"iata":"KWI","lat":29.226600647,"lon":47.9688987732,"cca2":"KW","region":"Middle East","city":"Kuwait City"},{"iata":"VTE","lat":17.9757,"lon":102.5683,"cca2":"LA","region":"Asia Pacific","city":"Vientiane"},{"iata":"RIX","lat":56.9235992432,"lon":23.9710998535,"cca2":"LV","region":"Europe","city":"Riga"},{"iata":"BEY","lat":33.8208999634,"lon":35.4883995056,"cca2":"LB","region":"Middle East","city":"Beirut"},{"iata":"VNO","lat":54.6341018677,"lon":25.2858009338,"cca2":"LT","region":"Europe","city":"Vilnius"},{"iata":"LUX","lat":49.6265983582,"lon":6.211520195,"cca2":"LU","region":"Europe","city":"Luxembourg City"},{"iata":"MFM","lat":22.1495990753,"lon":113.592002869,"cca2":"MO","region":"Asia Pacific","city":"Macau"},{"iata":"TNR","lat":-18.91368,"lon":47.53613,"cca2":"MG","region":"Africa","city":"Antananarivo"},{"iata":"JHB","lat":1.635848,"lon":103.665943,"cca2":"MY","region":"Asia Pacific","city":"Johor Bahru"},{"iata":"KUL","lat":2.745579958,"lon":101.709999084,"cca2":"MY","region":"Asia Pacific","city":"Kuala Lumpur"},{"iata":"MLE","lat":4.1748,"lon":73.50888,"cca2":"MV","region":"Asia Pacific","city":"Male"},{"iata":"MRU","lat":-20.4302005768,"lon":57.6836013794,"cca2":"MU","region":"Africa","city":"Port Louis"},{"iata":"GDL","lat":20.5217990875,"lon":-103.3109970093,"cca2":"MX","region":"North America","city":"Guadalajara"},{"iata":"MEX","lat":19.4363002777,"lon":-99.0720977783,"cca2":"MX","region":"North America","city":"Mexico City"},{"iata":"QRO","lat":20.6173000336,"lon":-100.185997009,"cca2":"MX","region":"North America","city":"Queretaro"},{"iata":"KIV","lat":46.9277000427,"lon":28.9309997559,"cca2":"MD","region":"Europe","city":"Chișinău"},{"iata":"ULN","lat":47.8431015015,"lon":106.766998291,"cca2":"MN","region":"Asia Pacific","city":"Ulaanbaatar"},{"iata":"CMN","lat":33.3675003052,"lon":-7.5899701118,"cca2":"MA","region":"Africa","city":"Casablanca"},{"iata":"MPM","lat":-25.9207992554,"lon":32.5726013184,"cca2":"MZ","region":"Africa","city":"Maputo"},{"iata":"MDL","lat":21.7051697,"lon":95.9695206,"cca2":"MM","region":"Asia Pacific","city":"Mandalay"},{"iata":"RGN","lat":16.9073009491,"lon":96.1332015991,"cca2":"MM","region":"Asia Pacific","city":"Yangon"},{"iata":"KTM","lat":27.6965999603,"lon":85.3591003418,"cca2":"NP","region":"Asia Pacific","city":"Kathmandu"},{"iata":"AMS","lat":52.3086013794,"lon":4.7638897896,"cca2":"NL","region":"Europe","city":"Amsterdam"},{"iata":"NOU","lat":-22.0146007538,"lon":166.212997436,"cca2":"NC","region":"Oceania","city":"Noumea"},{"iata":"AKL","lat":-37.0080986023,"lon":174.792007446,"cca2":"NZ","region":"Oceania","city":"Auckland"},{"iata":"CHC","lat":-43.4893989563,"lon":172.5319976807,"cca2":"NZ","region":"Oceania","city":"Christchurch"},{"iata":"LOS","lat":6.5773701668,"lon":3.321160078,"cca2":"NG","region":"Africa","city":"Lagos"},{"iata":"OSL","lat":60.193901062,"lon":11.100399971,"cca2":"NO","region":"Europe","city":"Oslo"},{"iata":"MCT","lat":23.5932998657,"lon":58.2844009399,"cca2":"OM","region":"Middle East","city":"Muscat"},{"iata":"ISB","lat":33.6166992188,"lon":73.0991973877,"cca2":"PK","region":"Asia Pacific","city":"Islamabad"},{"iata":"KHI","lat":24.9064998627,"lon":67.1607971191,"cca2":"PK","region":"Asia Pacific","city":"Karachi"},{"iata":"LHE","lat":31.5216007233,"lon":74.4036026001,"cca2":"PK","region":"Asia Pacific","city":"Lahore"},{"iata":"ZDM","lat":32.2719,"lon":35.0194,"cca2":"PS","region":"Middle East","city":"Ramallah"},{"iata":"PTY","lat":9.0713596344,"lon":-79.3834991455,"cca2":"PA","region":"South America","city":"Panama City"},{"iata":"ASU","lat":-25.2399997711,"lon":-57.5200004578,"cca2":"PY","region":"South America","city":"Asunción"},{"iata":"LIM","lat":-12.021900177,"lon":-77.1143035889,"cca2":"PE","region":"South America","city":"Lima"},{"iata":"CGY","lat":8.4156198502,"lon":124.611000061,"cca2":"PH","region":"Asia Pacific","city":"Cagayan de Oro"},{"iata":"CEB","lat":10.3074998856,"lon":123.978996277,"cca2":"PH","region":"Asia Pacific","city":"Cebu"},{"iata":"MNL","lat":14.508600235,"lon":121.019996643,"cca2":"PH","region":"Asia Pacific","city":"Manila"},{"iata":"WAW","lat":52.1656990051,"lon":20.9671001434,"cca2":"PL","region":"Europe","city":"Warsaw"},{"iata":"LIS","lat":38.7812995911,"lon":-9.1359195709,"cca2":"PT","region":"Europe","city":"Lisbon"},{"iata":"SJU","lat":18.411391,"lon":-66.102793,"cca2":"PR","region":"North America","city":"San Juan"},{"iata":"DOH","lat":25.2605946,"lon":51.6137665,"cca2":"QA","region":"Middle East","city":"Doha"},{"iata":"RUN","lat":-20.8871002197,"lon":55.5102996826,"cca2":"RE","region":"Africa","city":"Saint-Denis"},{"iata":"OTP","lat":44.5722007751,"lon":26.1021995544,"cca2":"RO","region":"Europe","city":"Bucharest"},{"iata":"KJA","lat":56.0153,"lon":92.8932,"cca2":"RU","region":"Asia Pacific","city":"Krasnoyarsk"},{"iata":"DME","lat":55.4087982178,"lon":37.9062995911,"cca2":"RU","region":"Europe","city":"Moscow"},{"iata":"LED","lat":59.8003005981,"lon":30.2625007629,"cca2":"RU","region":"Europe","city":"Saint Petersburg"},{"iata":"KLD","lat":56.8587,"lon":35.9176,"cca2":"RU","region":"Europe","city":"Tver"},{"iata":"SVX","lat":56.8431,"lon":60.6454,"cca2":"RU","region":"Asia Pacific","city":"Yekaterinburg"},{"iata":"KGL","lat":-1.9686299563,"lon":30.1394996643,"cca2":"RW","region":"Africa","city":"Kigali"},{"iata":"DMM","lat":26.471200943,"lon":49.7979011536,"cca2":"SA","region":"Middle East","city":"Dammam"},{"iata":"JED","lat":21.679599762,"lon":39.15650177,"cca2":"SA","region":"Middle East","city":"Jeddah"},{"iata":"RUH","lat":24.9575996399,"lon":46.6987991333,"cca2":"SA","region":"Middle East","city":"Riyadh"},{"iata":"DKR","lat":14.7412099,"lon":-17.4889771,"cca2":"SN","region":"Africa","city":"Dakar"},{"iata":"BEG","lat":44.8184013367,"lon":20.3090991974,"cca2":"RS","region":"Europe","city":"Belgrade"},{"iata":"SIN","lat":1.3501900434,"lon":103.994003296,"cca2":"SG","region":"Asia Pacific","city":"Singapore"},{"iata":"BTS","lat":48.1486,"lon":17.1077,"cca2":"SK","region":"Europe","city":"Bratislava"},{"iata":"CPT","lat":-33.9648017883,"lon":18.6016998291,"cca2":"ZA","region":"Africa","city":"Cape Town"},{"iata":"DUR","lat":-29.6144444444,"lon":31.1197222222,"cca2":"ZA","region":"Africa","city":"Durban"},{"iata":"JNB","lat":-26.133333,"lon":28.25,"cca2":"ZA","region":"Africa","city":"Johannesburg"},{"iata":"BCN","lat":41.2971000671,"lon":2.0784599781,"cca2":"ES","region":"Europe","city":"Barcelona"},{"iata":"MAD","lat":40.4936,"lon":-3.56676,"cca2":"ES","region":"Europe","city":"Madrid"},{"iata":"CMB","lat":7.1807599068,"lon":79.8841018677,"cca2":"LK","region":"Asia Pacific","city":"Colombo"},{"iata":"PBM","lat":5.452831,"lon":-55.187783,"cca2":"SR","region":"South America","city":"Paramaribo"},{"iata":"GOT","lat":57.6627998352,"lon":12.279800415,"cca2":"SE","region":"Europe","city":"Gothenburg"},{"iata":"ARN","lat":59.6519012451,"lon":17.9186000824,"cca2":"SE","region":"Europe","city":"Stockholm"},{"iata":"GVA","lat":46.2380981445,"lon":6.1089501381,"cca2":"CH","region":"Europe","city":"Geneva"},{"iata":"ZRH","lat":47.4646987915,"lon":8.5491695404,"cca2":"CH","region":"Europe","city":"Zurich"},{"iata":"KHH","lat":22.5771007538,"lon":120.3499984741,"cca2":"TW","region":"Asia Pacific","city":"Kaohsiung City"},{"iata":"TPE","lat":25.0776996613,"lon":121.233001709,"cca2":"TW","region":"Asia Pacific","city":"Taipei"},{"iata":"DAR","lat":-6.8781099319,"lon":39.2025985718,"cca2":"TZ","region":"Africa","city":"Dar es Salaam"},{"iata":"BKK","lat":13.6810998917,"lon":100.747001648,"cca2":"TH","region":"Asia Pacific","city":"Bangkok"},{"iata":"CNX","lat":18.7667999268,"lon":98.962600708,"cca2":"TH","region":"Asia Pacific","city":"Chiang Mai"},{"iata":"URT","lat":9.1325998306,"lon":99.135597229,"cca2":"TH","region":"Asia Pacific","city":"Surat Thani"},{"iata":"TUN","lat":36.8510017395,"lon":10.2271995544,"cca2":"TN","region":"Africa","city":"Tunis"},{"iata":"IST","lat":40.9768981934,"lon":28.8145999908,"cca2":"TR","region":"Europe","city":"Istanbul"},{"iata":"ADB","lat":38.32377,"lon":27.14317,"cca2":"TR","region":"Europe","city":"Izmir"},{"iata":"KBP","lat":50.3450012207,"lon":30.8946990967,"cca2":"UA","region":"Europe","city":"Kyiv"},{"iata":"DXB","lat":25.2527999878,"lon":55.3643989563,"cca2":"AE","region":"Middle East","city":"Dubai"},{"iata":"EDI","lat":55.9500007629,"lon":-3.3724999428,"cca2":"GB","region":"Europe","city":"Edinburgh"},{"iata":"LHR","lat":51.4706001282,"lon":-0.4619410038,"cca2":"GB","region":"Europe","city":"London"},{"iata":"MAN","lat":53.3536987305,"lon":-2.2749500275,"cca2":"GB","region":"Europe","city":"Manchester"},{"iata":"MGM","lat":32.30059814,"lon":-86.39399719,"cca2":"US","region":"North America","city":"Montgomery"},{"iata":"ANC","lat":61.158555,"lon":-149.890208,"cca2":"US","region":"North America","city":"Anchorage"},{"iata":"PHX","lat":33.434299469,"lon":-112.012001038,"cca2":"US","region":"North America","city":"Phoenix"},{"iata":"LAX","lat":33.94250107,"lon":-118.4079971,"cca2":"US","region":"North America","city":"Los Angeles"},{"iata":"SMF","lat":38.695400238,"lon":-121.591003418,"cca2":"US","region":"North America","city":"Sacramento"},{"iata":"SAN","lat":32.7336006165,"lon":-117.190002441,"cca2":"US","region":"North America","city":"San Diego"},{"iata":"SFO","lat":37.6189994812,"lon":-122.375,"cca2":"US","region":"North America","city":"San Francisco"},{"iata":"SJC","lat":37.3625984192,"lon":-121.929000855,"cca2":"US","region":"North America","city":"San Jose"},{"iata":"DEN","lat":39.8616981506,"lon":-104.672996521,"cca2":"US","region":"North America","city":"Denver"},{"iata":"JAX","lat":30.4941005707,"lon":-81.6878967285,"cca2":"US","region":"North America","city":"Jacksonville"},{"iata":"MIA","lat":25.7931995392,"lon":-80.2906036377,"cca2":"US","region":"North America","city":"Miami"},{"iata":"TLH","lat":30.3964996338,"lon":-84.3503036499,"cca2":"US","region":"North America","city":"Tallahassee"},{"iata":"TPA","lat":27.9755001068,"lon":-82.533203125,"cca2":"US","region":"North America","city":"Tampa"},{"iata":"ATL","lat":33.6366996765,"lon":-84.4281005859,"cca2":"US","region":"North America","city":"Atlanta"},{"iata":"HNL","lat":21.3187007904,"lon":-157.9219970703,"cca2":"US","region":"North America","city":"Honolulu"},{"iata":"ORD","lat":41.97859955,"lon":-87.90480042,"cca2":"US","region":"North America","city":"Chicago"},{"iata":"IND","lat":39.717300415,"lon":-86.2944030762,"cca2":"US","region":"North America","city":"Indianapolis"},{"iata":"BGR","lat":44.8081,"lon":-68.795,"cca2":"US","region":"North America","city":"Bangor"},{"iata":"BOS","lat":42.36429977,"lon":-71.00520325,"cca2":"US","region":"North America","city":"Boston"},{"iata":"DTW","lat":42.2123985291,"lon":-83.3534011841,"cca2":"US","region":"North America","city":"Detroit"},{"iata":"MSP","lat":44.8819999695,"lon":-93.2218017578,"cca2":"US","region":"North America","city":"Minneapolis"},{"iata":"MCI","lat":39.2975997925,"lon":-94.7138977051,"cca2":"US","region":"North America","city":"Kansas City"},{"iata":"STL","lat":38.7486991882,"lon":-90.3700027466,"cca2":"US","region":"North America","city":"St. Louis"},{"iata":"OMA","lat":41.3031997681,"lon":-95.8940963745,"cca2":"US","region":"North America","city":"Omaha"},{"iata":"LAS","lat":36.08010101,"lon":-115.1520004,"cca2":"US","region":"North America","city":"Las Vegas"},{"iata":"EWR","lat":40.6925010681,"lon":-74.1687011719,"cca2":"US","region":"North America","city":"Newark"},{"iata":"ABQ","lat":35.0844,"lon":-106.6504,"cca2":"US","region":"North America","city":"Albuquerque"},{"iata":"BUF","lat":42.94049835,"lon":-78.73220062,"cca2":"US","region":"North America","city":"Buffalo"},{"iata":"CLT","lat":35.2140007019,"lon":-80.9430999756,"cca2":"US","region":"North America","city":"Charlotte"},{"iata":"RDU","lat":35.93543,"lon":-78.88075,"cca2":"US","region":"North America","city":"Durham"},{"iata":"CLE","lat":41.50069,"lon":-81.68412,"cca2":"US","region":"North America","city":"Cleveland"},{"iata":"CMH","lat":39.9980010986,"lon":-82.8918991089,"cca2":"US","region":"North America","city":"Columbus"},{"iata":"OKC","lat":35.46655,"lon":-97.65373,"cca2":"US","region":"North America","city":"Oklahoma City"},{"iata":"PDX","lat":45.58869934,"lon":-122.5979996,"cca2":"US","region":"North America","city":"Portland"},{"iata":"PHL","lat":39.8718986511,"lon":-75.2410964966,"cca2":"US","region":"North America","city":"Philadelphia"},{"iata":"PIT","lat":40.49150085,"lon":-80.23290253,"cca2":"US","region":"North America","city":"Pittsburgh"},{"iata":"FSD","lat":43.540819819502,"lon":-96.65511577730963,"cca2":"US","region":"North America","city":"Sioux Falls"},{"iata":"MEM","lat":35.0424003601,"lon":-89.9766998291,"cca2":"US","region":"North America","city":"Memphis"},{"iata":"BNA","lat":36.1245002747,"lon":-86.6781997681,"cca2":"US","region":"North America","city":"Nashville"},{"iata":"AUS","lat":30.1975,"lon":-97.6664,"cca2":"US","region":"North America","city":"Austin"},{"iata":"DFW","lat":32.8968009949,"lon":-97.0380020142,"cca2":"US","region":"North America","city":"Dallas"},{"iata":"IAH","lat":29.9843997955,"lon":-95.3414001465,"cca2":"US","region":"North America","city":"Houston"},{"iata":"MFE","lat":26.17580032,"lon":-98.23860168,"cca2":"US","region":"North America","city":"McAllen"},{"iata":"SAT","lat":29.429461,"lon":-98.487061,"cca2":"US","region":"North America","city":"San Antonio"},{"iata":"SLC","lat":40.7883987427,"lon":-111.977996826,"cca2":"US","region":"North America","city":"Salt Lake City"},{"iata":"IAD","lat":38.94449997,"lon":-77.45580292,"cca2":"US","region":"North America","city":"Ashburn"},{"iata":"ORF","lat":36.8945999146,"lon":-76.2012023926,"cca2":"US","region":"North America","city":"Norfolk"},{"iata":"RIC","lat":37.5051994324,"lon":-77.3197021484,"cca2":"US","region":"North America","city":"Richmond"},{"iata":"SEA","lat":47.4490013123,"lon":-122.308998108,"cca2":"US","region":"North America","city":"Seattle"},{"iata":"TAS","lat":41.257900238,"lon":69.2811965942,"cca2":"UZ","region":"Asia Pacific","city":"Tashkent"},{"iata":"HAN","lat":21.221200943,"lon":105.806999206,"cca2":"VN","region":"Asia Pacific","city":"Hanoi"},{"iata":"SGN","lat":10.8187999725,"lon":106.652000427,"cca2":"VN","region":"Asia Pacific","city":"Ho Chi Minh City"},{"iata":"HRE","lat":-17.9318008423,"lon":31.0928001404,"cca2":"ZW","region":"Africa","city":"Harare"}] -------------------------------------------------------------------------------- /群友X发的提取vless/CF-IP/识别cf-vless..txt的国家,按国家名称放到不同的文件.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/群友X发的提取vless/CF-IP/识别cf-vless..txt的国家,按国家名称放到不同的文件.zip -------------------------------------------------------------------------------- /群友X发的提取vless/CF-IP/识别cf-vless.txt国家放到一个文件.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjccc1999/Cf-fdip/8ffd2961e5b3845eed7b93785c715622d6d796a9/群友X发的提取vless/CF-IP/识别cf-vless.txt国家放到一个文件.zip -------------------------------------------------------------------------------- /群友X发的提取vless/vless.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 检查是否提供了输入文件参数 4 | if [ ! -f "cf-vless.txt" ]; then 5 | echo "Error: File cf-vless.txt does not exist in the current directory." 6 | exit 1 7 | fi 8 | 9 | # 使用awk读取每一行并提取第二个和第四个字段,然后使用sort和uniq进行排序和去重 10 | awk -F'[@?#]' '{print $2"#" $4}' cf-vless.txt | sort -t '#' -u -k1,1 > vless-ip.txt 11 | 12 | echo "Processing completed. Results are saved in vless-ip.txt." 13 | --------------------------------------------------------------------------------