利用Google Code Search找出数据库密码


Google前天推出了 代码搜索工具
在Digg上有人已经发了 Finding Passwords with Google
文章开头的图是搜索WordPress的数据库资料,包括用户名和密码的例子:
http://google.com/codesearch?hl=en&lr=&q=lang%3Aphp+file%3Awp-config+user+-sample&btnG=Search
上面的搜索是定义搜索文件类型为PHP,文件名为wp-config(即WordPress的配置文件),包含user,并且不包括sample(因为wp-config-sample.php是WordPress默认的配置文件样本,并不包含用户的资料)。
不过搜索到的都是压缩包里的代码,并不是实际正在运行的网站的代码。

Digg上有人给出了更多的例子:
http://www.google.com/codesearch?hl=en&lr=&q=mysql_connect%5C%28%5C%22%5Cw%2B%5C%22%2C+%5C%22%5Cw%2B%5C%22%2C+%5C%22%5Cw%2B%5C%22%5C%29
http://google.com/codesearch?q=+%5C%24user%3D%5CS%2B+pass.*%3D%5CS%2B+config&start=30&sa=N
http://google.com/codesearch?q=+file:config.inc.php%24+user+password+MySQL&start=20&sa=N
http://google.com/codesearch?q=+file:web.config+connectionstring+pwd%3D+show:CU41SOd97uE:ETRH4t2fEP4:kStCOM9rUy0&sa=N&cd=73&ct=rc&cs_p=http://media.wiley.com/product_ancillary/40/07821425/DOWNLOAD/4254code.zip&cs_f=Realtor/xmlreader/Web.config#a0
http://google.com/codesearch?q=+file:web.config+discountasp.net+show:5JjkFGBaf5c:qjXh1d9Z7rE:SVNCtQSrIck&sa=N&cd=1&ct=rc&cs_p=http://www.vrdotnet.com/Projects/UNeDocs/Sources/UneDocsSources.zip&cs_f=UneDocs/Src/Server/UNeDocsWebServiceLibrary/Web.config#a0
Google代码搜索的 高级搜索功能 可以定义更精确的搜索。

本文参考GSeeker和Digg上关于Google Code Search的部分。

相关日志

发表评论