PDA

View Full Version : Fun With Google


mlseim
07-25-2005, 08:14 PM
Here's some interesting searching to try. Locating website directories where they are missing the index.html file.

Perl Script ... name it "goog.pl" ... (or alter form action)

#!/usr/bin/perl

use CGI ':standard';
$keyword = param('keyword');
$keyword2 = param('keyword2');
unless($keyword){
print "Content-type: text/html\n\n";
print"
<html>
<head><title>Fun With Google</title></head>
<body>
Fortunately, people have created directories for their images, files, mp3's<br>
without an 'index.html' file. That means, we can view their directories and<br>
browse around their files.<br><br>
Enter in a keyword such as: <b>paris_hilton.jpg</b>, or just <b>jpg</b>, <b>gif</b>, etc.<br>
How about finding some free <b>MP3</b> files to download?<br><br>
Use one Keyword, or add a second for an added search word.<br><br>
<form action='goog.pl' method='POST'>
Keyword: <input type='text' name='keyword' value=''> (don't use quotes)<br>
Keyword: <input type='text' name='keyword2' value=''> (don't use quotes)<br>
<input type='Submit' value='Google Me'>
<br><br>
Once you're inside the directories, don't forget to see if there are<br>
sub-directories, or root directories. Lots of fun to look around sites.
</form>
</body>
</html>
";
exit;
}
if($keyword2)
{
#You can of course, alter the string to create different searches ...

$location = "http://www.google.com/search?hl=en&lr=&safe=off&c2coff=1&q=-inurl:(htm|html|php) intitle:”index of” +”last modified” +”parent directory” +description +size +(\"$keyword\"|\"$keyword2\")";

print "Location: $location\n\n";
}
else
{
#You can of course, alter the string to create different searches ...

$location = "http://www.google.com/search?hl=en&lr=&safe=off&c2coff=1&q=-inurl:(htm|html|php) intitle:”index of” +”last modified” +”parent directory” +description +size +(\"$keyword\")";

print "Location: $location\n\n";
}

Here's a test script online:

http://www.catpin.com/cgi-bin/goog.pl


.

nkrgupta
07-26-2005, 07:04 AM
amazing stuff mlseim..!!
Keep it up :thumbsup:

iota
07-26-2005, 07:33 AM
Sounds interesting ! Thank you. :)

mark87
07-26-2005, 09:23 AM
Nice, ....la la la 'users.pwd' la la...

NB. I don't condone black hat hacking. :)