Extractor de Proxy Desde http://www.proxy-list.net/

Iniciado por OzX, 1 Septiembre 2008, 00:46 AM

0 Miembros y 2 Visitantes están viendo este tema.

OzX

Siempre es mas que útil tener una lista bastante extensa de Proxy para poder utilizar en distintas herramientas que estemos desarrollando, es por ello que desarrolle un script escrito en Perl el cual extrae todas los Proxy desde http://www.proxy-list.net/ , y los guarda en un archivo txt lista_proxy.txt.

Optimizado con fork().
Elimina Repetidos.

Código (perl) [Seleccionar]
use LWP::UserAgent;
use HTTP::Request;
#Proxt-List.Net Extract 0.1
# By OzX NULLBYTES.NET Extractor de Proxy  DESDE http://www.proxy-list.net
#THANX ALL NULLBYTES.NET STAFF

@regexp = ('.*shtml\?','\"><font.*');
sub extract{
$index = $_[0];
$match = $_[1];
foreach $linea (get($index)){
if ($linea=~m/$match/i){
foreach $regexp (@regexp){$linea=~s/$regexp//;}
push (@links,"http://www.proxy-list.net/ShowList.pl?".$linea."\n");
}

}
return @links;
}
################################################################
################################################################
#EXTRAIGO TODAS LAS IP | DIRECION PRINCIPAL, MATCH DE BUSQUEDA DE LINKS, MATCH DE BUSQUEDA DE IP.
@links= extract('http://www.proxy-list.net/fresh-proxy-lists.shtml','show-proxy-lists\.shtml\?\w{1,30}');
$total = scalar(@links);
#################################################################
syswrite STDOUT , "[+] Total de Links A Visitar $total \n [+] CRAWLING ....\n";
open (IP,">PROXY.TXT");
for($i=1;$i<$total;$i++){
$pid = fork();
if( $pid == 0 ){
@ip = ip($links[$i]);
syswrite STDOUT ,"[+] CRAW => $links[$i]";
print IP @ip;

exit 0;
                }
                            }
close(IP);
#######################################################
open(PROXY,"PROXY.txt"); @proxy=<PROXY>;close (PROXY);
########Eliminando Repetidos
foreach my $parte ( @proxy ) {
     next if $ya_visto{ $parte }++;
     push @ip, $parte;
}
#############################################################

open (IP,">lista_proxy.txt"); print IP @ip; close(IP);

###########################SUB #############################
sub ip{
$link = $_[0];
@codigo = get($link);
foreach $ip (@codigo){
if ($ip=~m/\d+.\d+\.\d+\.\d+:\d+/){
push (@ip,$ip."\n");
}
}
return @ip;
}
##################################################################
sub get{
$url=$_[0];
####UserAgent###############
$browser = LWP::UserAgent->new();
$browser->timeout(10);
$browser->default_header(
"User-Agent" => "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1",
"Accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language" => "es-es,es;q=0.8,en-us;q=0.5,en;q=0.3",
"Referer" => "http://www.proxy-list.net/fresh-proxy-lists.shtml"
);
###Petcion GET################################
$request = HTTP::Request->new(GET => $url);
$response = $browser->request($request);
$contents = $response->as_string;
#######Respuesta##################
@code = split("\n",$contents);
return @code;
}



Citar143.248.139.171:3124
62.149.67.49:8080
62.149.112.38:8080
62.149.112.33:8080
213.253.169.130:808
208.117.131.115:3124
204.85.191.10:3124
204.8.155.226:3128
200.19.159.34:3124
194.36.10.154:3127
193.136.191.26:3128
193.136.191.25:3128
192.33.90.67:3124
192.33.210.16:3124
169.229.50.7:3124
169.229.50.5:3127
164.107.127.13:3124
164.107.127.12:3127
155.98.35.6:3128
155.246.12.164:3124
152.3.138.3:3127
141.76.45.17:3124
141.13.16.201:3127
136.145.115.196:3124
132.252.152.193:3128
132.239.17.226:3128
132.239.17.224:3124
131.247.2.242:3124
129.174.79.249:3124
128.8.126.111:3128
128.6.192.158:3127
128.223.8.112:3127
128.208.4.99:3124
128.208.4.199:3128
128.208.4.198:3127
128.2.223.63:3127
128.112.139.75:3127
194.36.10.156:3127
130.192.157.132:3128
130.92.70.252:3128
132.252.152.194:3127
134.34.246.4:3124
134.76.81.91:3124
136.145.115.196:3128
138.23.204.232:3124
141.24.33.162:3124
152.3.138.4:3124
160.94.220.241:3127
169.229.50.11:3127
169.229.50.5:3128
169.229.50.16:3127
128.113.226.235:3124
128.223.8.112:3128
128.233.252.11:3124
128.4.36.12:3124
129.59.88.180:3124
130.192.157.131:3124
192.33.90.195:3128
192.33.90.66:3128
192.33.90.67:3127
192.42.43.23:3127
133.1.74.162:3124
141.76.45.18:3128
142.150.238.12:3124
152.3.138.1:3124
193.55.112.41:3128
165.230.49.115:3128
169.229.50.10:3124
195.130.121.204:3128
198.82.160.220:3124
200.132.0.70:3127
200.19.159.34:3127
147.102.3.101:3128
128.111.52.61:3128
128.252.19.20:3124
128.163.142.20:3128
152.3.138.5:3128
128.163.142.21:3127
128.195.54.161:3128
130.75.87.83:3124
131.246.191.42:3127
133.1.74.163:3127
138.23.204.133:3124
169.229.50.15:3128
192.33.210.16:3128
193.136.227.163:3127
131.247.2.241:3124
128.135.11.152:3124
128.113.226.236:3127
128.208.4.197:3127
128.208.4.198:3128
137.226.138.156:3124
193.167.187.188:3127
128.252.19.22:3127
129.69.210.96:3127
141.24.249.130:3128
155.98.35.3:3128
155.98.35.6:3127
169.229.50.14:3124
192.197.121.3:3128
129.186.205.77:3124
130.75.87.84:3124
132.187.230.1:3124
136.145.115.194:3124
137.226.138.154:3124
204.8.155.227:3128
156.17.10.52:3128
142.150.238.13:3128
137.99.11.87:3127
198.82.160.220:3128
136.145.115.194:3128
149.169.227.129:3124
155.225.2.72:3128
169.229.50.15:3127
61.110.143.2:808
61.145.121.124:847
64.34.173.112:8888
165.193.47.39:80
192.54.45.201:8000
200.62.15.67:8080
202.75.144.62:8080
202.108.28.23:8080
203.158.221.226:443
216.191.142.125:80
218.27.148.66:8080
219.159.67.187:808
129.174.79.249:3128
128.112.139.80:3128
131.247.2.242:3127
72.36.112.71:3124
128.223.8.111:3127
129.10.120.193:3127
155.246.12.163:3127
169.229.50.14:3128
169.229.50.6:3128
169.229.50.9:3124
169.229.50.15:3124
169.229.50.7:3128
72.36.112.74:3128
128.59.20.228:3124
208.117.131.115:3128
165.91.83.22:3124
169.229.50.13:3127
129.74.74.16:3124
164.107.127.12:3128
128.151.65.101:3127
128.187.223.212:3127
128.238.88.64:3128
128.31.1.12:3128
128.4.36.11:3127
129.186.205.71:3128
129.186.205.77:3128
129.24.211.26:3128
152.15.98.226:3124
152.3.138.2:3124
128.112.139.73:3124
128.112.139.78:3124
204.56.0.137:3128
206.207.248.34:3124
128.8.126.112:3124
131.247.2.241:3128
128.59.20.227:3128
66.27.206.26:6406
138.238.250.157:3124
129.24.211.25:3128
155.225.2.72:3124
72.36.112.72:3127
204.85.191.10:3128
204.85.191.11:3128
156.17.10.52:3127
141.24.33.192:3127
147.102.3.102:3124
129.59.88.180:3128
160.94.220.241:3124
198.82.160.221:3128
128.8.126.111:3127
200.132.0.70:3128
128.232.103.202:3128
203.177.193.102:3128
193.136.227.163:3124
164.73.47.244:3128
138.246.99.250:3124
192.33.90.67:3128
143.215.129.117:3128
134.76.81.92:3124
132.68.237.36:3124
198.82.160.220:3127
131.175.17.10:3128
192.41.135.218:3128
131.247.2.241:3127
194.29.178.13:3124
155.246.12.163:3124
212.24.238.155:80
201.95.124.101:6588
201.68.4.187:6588
200.207.47.209:6588
200.161.108.144:6588
189.53.70.22:6588
189.19.195.251:8080
118.175.255.10:80
87.23.22.9:8080
85.172.120.214:3128
77.247.209.19:3128
72.55.191.6:3128
68.167.209.90:8000
189.3.11.12:8080
62.149.112.37:8080
80.63.1.213:80
82.5.185.111:7212
80.86.200.172:6649
24.188.58.1:8800
128.2.223.63:3128
128.6.192.156:3127
128.59.20.228:3128
143.215.129.117:3124
129.74.74.16:3128
128.187.223.212:3124
194.36.10.154:3128
128.232.103.201:3124
128.232.103.203:3128
192.33.90.68:3128
192.33.90.69:3127
192.42.43.22:3128
130.92.70.251:3128
192.33.90.196:3127
192.33.90.195:3127
192.42.43.23:3124
193.136.191.26:3127
193.136.191.25:3127
195.116.60.34:3124
156.17.10.51:3127
130.37.198.243:3127
163.221.11.73:3124
133.1.74.162:3128
130.136.254.21:3127
131.175.17.9:3128
195.130.121.205:3128
147.102.3.102:3127
137.226.138.154:3128
132.252.152.193:3124
141.24.33.192:3128
129.69.210.97:3128
137.226.138.156:3128
141.76.45.18:3127
129.69.210.96:3128
141.24.33.161:3124
138.246.99.249:3128
141.24.33.162:3128
213.205.99.185:80
213.205.99.182:80
213.205.99.181:80
193.167.182.130:3127
193.167.187.188:3128
121.14.139.147:8088
142.150.238.12:3128
192.197.121.3:3124
198.163.152.230:3127
200.132.0.70:3124
143.107.111.195:3124
200.207.88.222:6588
128.232.103.203:3124
169.229.50.8:3128
128.4.36.12:3128
128.4.36.11:3128
128.208.4.197:3128
128.252.19.21:3128
206.117.37.4:3128
206.207.248.34:3128
128.135.11.152:3128
142.150.238.13:3124
129.59.88.179:3128
164.73.47.242:3128
123.243.252.73:80
210.19.71.89:80
204.8.155.227:3127
129.24.211.26:3124
194.117.20.214:3128
164.107.127.13:3127
132.187.230.1:3127
81.192.52.62:80
218.139.64.79:8080
195.130.121.204:3127
195.113.161.83:3127
193.136.227.163:3128
192.42.43.22:3127
169.229.50.10:3127
165.230.49.115:3124
160.94.220.241:3128
141.24.249.130:3124
129.41.69.20:80
128.59.20.227:3124
128.192.101.218:3128
128.187.223.211:3127
128.163.142.20:3124
128.112.139.97:3128
202.105.182.87:808
129.59.88.179:3124
152.3.138.5:3124
193.174.67.186:3128
138.23.204.232:3127
152.3.138.2:3127
169.229.50.10:3128
138.23.204.133:3128
128.187.223.211:3128
132.239.17.225:3124
128.223.8.111:3128
128.59.20.226:3128
152.3.138.4:3128
72.36.112.71:3128
122.169.241.78:6409
203.121.133.124:80
61.144.217.173:80
155.98.35.5:3128
164.107.127.12:3124
128.192.101.217:3128
125.46.34.52:8088
193.251.181.135:8080
134.34.246.5:3124
193.167.187.187:3127
128.232.103.202:3124
128.232.103.201:3128
129.24.211.25:3124
204.56.0.137:3124
128.252.19.21:3127
128.238.88.64:3127
62.38.189.214:8080


Saludos¡

Ideas¡ Dudas¡ Nuevas FOrmas, etc
COmentar¡

www.nullbytes.net¡
http://www.nullbytes.net/extractor-de-proxy-desde-httpwwwproxy-listnet/

OzX


HK


Littlehorse

#3
Can't locate object method "Default header" via package "LWP::Useragent".
La verdad revise el code una y otra vez y sigo sin encontrar el error :/, estoy algo oxidado en perl pero no tanto.


Edit: Lo que estaba oxidado era la version del Active  :xD ;D, pero aunque ahora funciona los .txt me los crea vacios.
An expert is a man who has made all the mistakes which can be made, in a very narrow field.