引用:
作者: atie
這個程式會不會到後來就是變成
像是在收集網友的mail Add
然後賣給行銷公司 廣發廣告郵件的程式啊
|
當然不會啦,公開的部份只會收集在網址清單裡的資料
要到全自動就要加程式啦
而且要看得懂我的perl天書寫什麼囉
以下是perl程式碼:
PHP 語法:
#!perl
use LWP::Simple;
print "輸入要尋找的網址:";
my $url=<> ;
my $file='tmp.html';
my $GoURL='GoURL.txt';
my $mailURL='mailURL.txt';
chomp $url;
my $url1=$url;
$url1 =~ s/[?].*//g;
print "$url1";
my $www = get("$url");
getstore($www, tmp.html); # 存入檔案
open(html,"> $file")||print "不能寫入$file";
print html "$www";
close(html);
open (html,"< $file")||print "不能開啟$file";
open (mailurl,">>$mailURL")||print "不能開啟$mailURL";
open (url,">>$GoURL")||print "不能開啟$GoURL";
while($line=<html>){
chomp $line;
if($line =~ /(href\=\"\S{1,100}\")/is){
my $url2=$1;
$url2 =~ s/href\=//ig;
$url2 =~ s/"//g;
if($url2 =~ /\b(\/.*)/is){
print url "$url1$1\n";
}elsif($1 =~ /\b(h.*)/is){
print url "$url2\n";
}elsif($url2 =~ /([\?].*)/is){
print "$1\n";
}elsif($url2 =~ /\b(m.*)/is){
my $mail=$1;
$mail =~ s/mailto\://g;
if($mail =~ /(.*\@.*)/ ){
print mailurl "$1\n";
}
}
}
if($line =~ /(\w{1,20}\d\w{1,20}\@\S{1,20}[.]\S{1,20}tw)/is){
print mailurl "$1\n";
}
if($line =~ /(\w{1,20}\d\w{1,20}\@\S{1,20}[.]com)/is){
print mailurl "$1\n";
}
if($line =~ /(\w{1,20}\d\w{1,20}\@\S{1,20}[.]org)/is){
print mailurl "$1\n";
}
if($line =~ /(\w{1,20}\d\w{1,20}\@\S{1,20}[.]hk)/is){
print mailurl "$1\n";
}
}
close(url);
close(mailurl);
close(html);
windwos下的直接執行exe檔
下載測試
會自行產生GoURL.txt來放置收集到的網址
mailURL.txt來放置收集到的e-mail
把pchome貼圖測試網址貼上:
http://ejokeimg.pchome.com.tw/see-po...&cat=111&rank=