【发布时间】:2012-07-16 16:42:51
【问题描述】:
只是想知道如何递归搜索网站文件夹目录(与脚本上传到的目录相同)并打开/读取每个文件并搜索特定字符串?
例如我可能有这个:
search.php?string=hello%20world
这将运行一个进程然后输出类似的东西
"hello world found inside"
httpdocs
/index.php
/contact.php
httpdocs/private/
../prviate.php
../morestuff.php
../tastey.php
httpdocs/private/love
../../goodness.php
我不希望它链接-抓取,因为私有文件和未链接的文件是圆形的,但我希望其他所有非二进制文件都可以访问。
非常感谢
欧文
【问题讨论】:
-
你能在服务器上运行
grep吗?
标签: php directory web-crawler