บอล
ตะกี้เขียนผิดง่าาา T_T สั่ง outfile แล้วมันเขียน fileใหม่เลยงะ
แก้เปนงี้ละ - -" สั่ง out ชื่อfile เดิมได้แล้วอะ
print "####################################\n";
print "### Search IT faculty ###\n";
print "####################################\n";
print "filename : ";
my $file = <STDIN>;
print "startnum : ";
my $start = <STDIN>;
print "Endnum : ";
my $end = <STDIN>;
use LWP::UserAgent;
my $browser = LWP::UserAgent->new(
agent => 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)',);
foreach $i ( "$start" .. "$end" ){
my $response = $browser->get($url);
$response = $browser->post('http://www.thaistudent.info/',[form_data=>$i,submit=>'คลิก !']);
print "$i\n";
if($response->is_success){
if($response->content =~ m/<\/b> 1848<br><br><br><a href="/){
open OUTFILE, ">> $file" or die "Can't open $file : $!";
print "[+] Found num [$i]!!\n";
print OUTFILE "[+]Found => $i\n";
close OUTFILE;
}
}else{
print "[-]don't have.\n";
}
โทดทีค๊าบบบ T_T