Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias download_proxies {
- ; /download_proxies <URL>
- if (!$1) { return }
- if ($1 isnum) {
- if ($urlget($1).state == fail) { echo 4 -at /download_proxies: Error, Connection failed! | return }
- copy_proxies $urlget($1).target
- }
- if ($1 isurl) {
- var %file = source.txt
- write -c $qt(%file)
- echo -tac info * /download_proxies: Retrieving ips + ports from $1-
- return $urlget($1,gfi,%file,download_proxies)
- }
- }
- alias copy_proxies {
- ; /copy_clipboard <path\file>
- if (!$1-) || (!$file($1-)) { return }
- var %f = $1-
- var %f1 = proxies.txt
- var %f2 = ports.txt
- var %tot_ips = 0
- var %tot_ports = 0
- var %tot = 0
- var %t = $lines(%f)
- var %i = 1
- while (%i <= %t) {
- var %line = $read(%f,n,%i)
- var %ip = $gettok($gettok(%line,1,32),1,58)
- var %port = $gettok($gettok(%line,1,32),2,58)
- if (%line) && (%ip) && (%port) && ($iptype(%ip)) && ($isnumber(%port)) {
- inc %tot 1
- var %r1 = $read(%f1,nw,$+(%ip,:,%port))
- var %r2 = $read(%f2,nw,%port)
- if (!%r1) { inc %tot_ips 1 | write $qt(%f1) $+(%ip,:,%port) }
- if (!%r2) { inc %tot_ports 1 | write $qt(%f2) %port }
- }
- inc %i
- }
- echo -tac info * /download_proxies: Finished! %tot_ips ips and %tot_ports ports copied from %tot items!
- }
Add Comment
Please, Sign In to add comment