Proxy pool first step, sweep the whole network nodes
Fofa syntax:
1protocol=="socks5" && "Version:5 Method:No Authentication(0x00)"
Quake Syntax:
xxxxxxxxxx11service:"socks5" and response:"Accepted Auth Method: 0x0"
Fofa sweeps pools built by others, derived from the github project proxypool (find it, URL+all to see bulk proxies))
xxxxxxxxxx11body="Welcome to Proxy Pool System"
--> after sweep fetch --> All interface fetch:
x1# -*- coding: utf-8 -*-23# @Features : # Enter feature name here4# Enter feature description here56import requests7import random8import telnetlib9import socket10from multiprocessing import Pool11from pprint import pprint12from tqdm import tqdm1314def get_proxy_pool(ipport):15if False:16proxies = {17"http": "http://192.168.0.68:7890",18"https": "http://192.168.0.68:7890",19}20else:21proxies = {}22url = f'http://{ipport}/all'23resp = requests.get(url, proxies=proxies, timeout=5)24resp.raise_for_status()2526return resp.text272829def telnet(ipport):30try:31host, port = ipport.split(':')32tn = telnetlib.Telnet(host, port, timeout=5)33tn.close()34return True35except (socket.timeout, ConnectionRefusedError, OSError):36return False373839def process_ipport(_ipport):40if not telnet(_ipport):41return None42try:43proxy_pool = get_proxy_pool(_ipport)44return proxy_pool.split("\n")45except Exception as e:46print(e)47return None4849def main():50_file = r'ipport.txt'51lst_server = []52with open(_file, 'r', encoding='utf-8') as f:53lst_server = [ipport.strip() for ipport in f if ipport.strip()]5455lst_server = list(set(lst_server))56# lst_server = random.sample(lst_server, min(5, len(lst_server)))5758lst_proxies = []5960with Pool(5) as pool:61results = list(tqdm(pool.imap(process_ipport, lst_server), total=len(lst_server), mininterval=5, ncols=120))6263lst_proxies = [proxy for result in results if result for proxy in result]6465lst_proxies = list(set(lst_proxies))66lst_proxies = list(filter(None, lst_proxies))67with open("./out_proxies.txt", "w") as f_out:68f_out.write("\n".join(lst_proxies))6970print("[*] Done")7172if __name__ == '__main__':73main()
https://github.com/sh1yan/Sppmagic(GO language,pass,I won't.) https://github.com/honmashironeko/ProxyCat(PY-->Utilization tools)
xxxxxxxxxx11python ProxyCat-V1.7.py -h
Both support local as well as cyberspace search engine use, the environment can be started, the project itself also explains how to use.
Other codes and their tools for detecting whether an IP is alive or not:
xxxxxxxxxx151# 响应200测活2proxies=(3"47.96.176.130:59394"4"178.48.68.61:18080"5"91.148.127.162:8080"6)7url="http://www.baidu.com"8for proxy in "${proxies[@]}"; do9response=$(curl -s -o /dev/null -w "%{http_code}" -x "$proxy" "$url")10if [ "$response" -eq 200 ]; then11echo "Proxy $proxy is valid."12else13echo "Proxy $proxy is invalid."14fi15done
xxxxxxxxxx251# 脚本py200,一个道理,没啥难度,甚至不具有价值。2import requests34proxies = [5"45.90.218.85:4444",6"34.81.160.132:80",7"193.162.143.222:4444"8]910def check_proxy(proxy):11try:12response = requests.get('http://www.google.com', proxies={"http": "http://" + proxy, "https": "https://" + proxy}, timeout=5)13if response.status_code == 200:14print(f"代理 {proxy} 可用。")15# else:16# print(f"代理 {proxy} 不可用。")17except requests.RequestException as e:18# print(f"代理 {proxy} 请求失败,错误信息: {e}")19pass20def main():21for proxy in proxies:22check_proxy(proxy)2324if __name__ == "__main__":25main()
Other:
| API 端点 | 描述 |
|---|---|
| https://269900.xyz/fetch_random | 返回一个代理 |
| https://269900.xyz/fetch_random?region=cn | 返回一个国内代理 |
| https://269900.xyz/fetch_random?region=cd | 返回一个国外代理 |
| https://269900.xyz/fetch_all?region=cn&count=5 | 返回count个代理,不加count默认返回全部 |
| 其他用法 | 描述 |
|---|---|
| /fetch_http | 获取http可用代理,可以+count和region指定数量和区域 |
| /fetch_http_all | 获取http全部代理,可以+count和region指定数量和区域 |
| /fetch_https | 获取https可用代理,可以+count和region指定数量和区域 |
| /fetch_https_all | 获取https全部代理,可以+count和region指定数量和区域 |
| /fetch_socks4 | 获取socks4可用代理,可以+count和region指定数量和区域 |
| /fetch_socks4_all | 获取socks4全部代理,可以+count和region指定数量和区域 |
| /fetch_socks5 | 获取socks5可用代理,可以+count和region指定数量和区域 |
| /fetch_socks5_all | 获取socks5全部代理,可以+count和region指定数量和区域 |
Description:
Proxy Latency: All returned proxies have a latency of less than 5000 milliseconds to ensure a faster response.
Proxy Number Recommendation: It is not recommended to get all the proxies as some of them may be valid for only a few minutes and may expire before use.
IP Geolocation: GeoIP is used for differentiation, although there may be some errors, it is accurate in most cases.
Server Configuration: Currently running on a 2core 1GB RAM server (don't go crazy with requests).
Access Restrictions: Supports direct domestic access without additional settings.
<OVER~>