use File::Find;
print "\n\n\t### Search String in Files on Directory and Subdirectory By ICheer_No0M ###\n\n";
print 'Path File : ';
chomp($path=<stdin>);
print 'Search Keyword : ';
chomp($string=<stdin>);
$keyword = AddSlashes($string);
find(\&file_names, $path);
sub file_names {
if($_ =~ /\.php$/){
$file = $File::Find::name;
open (MYFILE, $file);
$line = 1;
while (<MYFILE>) {
$content .= $_;
if($content=~/$keyword/){
print "\nFound : $string\n";
print "On Line : $line\n";
print "On File : $file\n";
}
$line += 1;
$content = "";
}
close (MYFILE);
}
}
print "\n\n\t### Finding $string on $path Complete... ###\n\n";
sub AddSlashes {
$text = $_[0];
$text =~ s/\\/\\\\/g;
$text =~ s/\$/\\\$/g;
$text =~ s/\'/\\'/g;
$text =~ s/\"/\\\"/g;
$text =~ s/\[/\\[/g;
$text =~ s/\]/\\\]/g;
$text =~ s/\(/\\(/g;
$text =~ s/\)/\\\)/g;
$text =~ s/\\0/\\\\0/g;
return $text;
}
เจอบักก็แก้เอานะครับ ตอนแรกจะไม่ปล่อย เขียนลวกๆ เอาไว้ใช้เอง เก๋ๆ เลียนแบบ grep #กะไว้ใช้ใน windows ด้วย
$ find /var/www/exploit -name "*.php" -exec grep -l "base64" {} \;

$ find /var/www/exploit -name "*.php" -exec grep -l "base64" {} \;
ตอบลบเปลี่ยนเป็น
$grep -r "base64" *.php
น่าจะสวยงามกว่าน่ะครัช ฮี่ๆ :D
อ่อ หนุ่มเปลี่ยนลิ้ง ใน "ญาติมิตรสนิทกัน ^^" ของ s4m3l0 เป็น s4m3l0.exteen.com ด้วยครับ เผอิญย้ายบ้านแล้ว
$grep -r "base64" *.php
ลบเป้น
$grep -r "base64" *
รีบไปหน่อย = ="