【社会】TBCのHP 4万件の個人情報出る{5/26}★H

このエントリーをはてなブックマークに追加
233朝まで名無しさん
何万件か自分で数えたい人はどうぞ。
メアド書いてない人はカウントされないのでやや少なめに出るけど。

#perl
use File::Find;

# 初期設定(自分の環境に合わせて設定)
my $sourcedir = "C:/どっかのディレクトリ"; #リストのあるディレクトリ
my $outfile = "C:/tbc.txt"; #結果の出力ファイル

# main(以下、いじる必要なし)
my $address = {};
chdir $sourcedir;
find(\&check_file, $sourcedir);
sub check_file{
open (IN, $_);
my @line;
while (<IN>){
/\,([a-zA-Z0-9\-\_\. ]+@[a-zA-Z0-9\-\_\. ]+)\,/;
if ($1) {
print "$1\n" unless($address->{$1});
$address->{$1} = 1;
}
}
close (IN);
}
my @address = keys(%$address);
open (OUT, ">>$outfile");
print OUT join("\n", @address);
close (OUT);
print "\n\n *** ", $#address + 1, " mail addresses are detected.\n";