proxybroker2 icon indicating copy to clipboard operation
proxybroker2 copied to clipboard

How to grab only http - https

Open j4uonline opened this issue 1 year ago • 1 comments

System: Centos 7.9

Command: proxybroker grab --limit 10 --outfile ./proxies.txt --countries US cat proxies.txt

Resulf: <Proxy US 0.00s [] 98.188.47.132:4145> <Proxy US 0.00s [] 104.200.135.46:4145> <Proxy US 0.00s [] 184.178.172.26:4145> <Proxy US 0.00s [] 184.170.245.148:4145> <Proxy US 0.00s [] 167.71.73.130:33035> <Proxy US 0.00s [] 174.77.111.196:4145> <Proxy US 0.00s [] 66.29.128.243:52645> <Proxy US 0.00s [] 98.175.31.195:4145> <Proxy US 0.00s [] 8.42.68.109:39593> <Proxy US 0.00s [] 192.252.214.20:15864>

And i check it all SOCKS(4/5)

How can i get only http/https?

Thank for read it

j4uonline avatar Apr 04 '23 06:04 j4uonline

@j4uonline Actually, if you check any of the https proxy, using mubeng, none of them will show live, so just grab HTTP, and you will be fine. But if you want it anyway, here you go:

!# Grab the 100 best US proxies
proxybroker find --types HTTP HTTPS --countries US --strict -l 100 --outfile proxies.txt 
!#Filter all HTTPS proxies 
grep -i https proxies.txt | sed 's/.*\(\b[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}:[0-9]\{1,5\}\).*/https:\/\/\1/'
!# Filter only HTTP proxies
grep -vi https proxies.txt | sed 's/.*\(\b[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}:[0-9]\{1,5\}\).*/http:\/\/\1/'

You can then verify them using mubeng:

mubeng -c -f /tmp/proxies-http.txt  --output live.txt 

image

Azathothas avatar May 06 '23 03:05 Azathothas