Parsero 是一个用 Python 编写的免费脚本,用于读取 Web 服务器的 Robots.txt 文件并查看 Disallow 条目。Disallow 条目告知搜索引擎,Web 服务器上托管的哪些目录或文件不得被索引。例如,"Disallow: /portal/login" 意味着 www.example.com/portal/login 上的内容不允许被 Google、Bing、Yahoo 等爬虫索引。这是管理员不向搜索引擎分享敏感或私人信息的一种方式。
但有时这些在 Disallow 条目中输入的路径,用户无需使用搜索引擎,只需访问 URL 和路径即可直接访问;而有时它们又不允许任何人访问。由于管理员通常会编写大量 Disallow 条目,其中部分可访问,部分不可访问,你可以使用 Parsero 检查每个 Disallow 条目的 HTTP 状态码,从而自动检查这些目录是否可访问。
此外,管理员编写了 robots.txt 并不意味着 Disallow 条目中写入的文件或目录不会被 Bing、Google、Yahoo 等搜索引擎索引。因此,Parsero 能够在 Bing 中搜索,以定位未经网站管理员授权而被索引的内容。Parsero 会对每个 Bing 结果以同样的方式检查 HTTP 状态码。
当你执行 Parsero 时,你可以看到 HTTP 状态码。例如,以下状态码:
200 OK The request has succeeded.
403 Forbidden The server understood the request, but is refusing to fulfill it.
404 Not Found The server hasn't found anything matching the Request-URI.
302 Found The requested resource resides temporarily under a different URI.
...
你可以从以下网址获取关于 Parsero 的最新信息: http://www.behindthefirewalls.com/search/?q=parsero
有三种简单方式可以安装 Parsero。
使用 setup.py 脚本
sudo setup.py install
使用 pip3
sudo apt-get install python3-pip
sudo pip3 install parsero
在 Kali Linux 中
sudo apt-get update
sudo apt-get install parsero
$ parsero -h
usage: parsero.py [-h] [-u URL] [-o] [-sb]
optional arguments:
-h, --help show this help message and exit
-u URL Type the URL which will be analyzed
-o Show only the "HTTP 200" status code
-sb Search in Bing indexed Disallows
-f FILE Scan a list of domains from a list
root@kali:~# parsero -u www.example.com -sb
____
| _ \ __ _ _ __ ___ ___ _ __ ___
| |_) / _` | '__/ __|/ _ \ '__/ _ \
| __/ (_| | | \__ \ __/ | | (_) |
|_| \__,_|_| |___/\___|_| \___/
Starting Parsero v0.75 (https://github.com/behindthefirewalls/Parsero) at 05/22/14 11:12:55
Parsero scan report for example.com
http://example.com/download.php 302 Moved Temporarily
http://example.com/raw.php 302 Moved Temporarily
http://example.com/embed_js.php 200 OK
http://example.com/embed.php 200 OK
http://example.com/print.php 302 Moved Temporarily
http://example.com/diff.php 302 Moved Temporarily
http://example.com/share.php 404 Not Found
http://example.com/report.php 302 Moved Temporarily
http://example.com/embed_iframe.php 200 OK
[+] 9 links have been analyzed and 3 of them are available!!!
Searching the Disallows entries in Bing
http://www.bing.com/search?q=site:http://example.com/download.php
http://www.bing.com/search?q=site:http://example.com/raw.php
- example.com/raw.php/contact?i=KR9c2erd 200 OK
- example.com/raw.php/legal.aspx 302 Moved Temporarily
- example.com/raw.php/points?i=KR9c2erd 200 OK
- example.com/raw.php/image/sqrn11sp3C/zayn-tshirt-one-direction?i=... 302 Moved Temporarily
http://www.bing.com/search?q=site:http://example.com/embed_js.php
http://www.bing.com/search?q=site:http://example.com/embed.php
http://www.bing.com/search?q=site:http://example.com/print.php
http://www.bing.com/search?q=site:http://example.com/diff.php
http://www.bing.com/search?q=site:http://example.com/share.php
http://www.bing.com/search?q=site:http://example.com/report.php
http://www.bing.com/search?q=site:http://example.com/embed_iframe.php
Finished in 7.290362596511841 seconds
使用此工具的责任由你自行承担。请使用 parsero 审计你自己的服务器或你有权扫描的服务器。我在此声明,对使用此工具所采取的任何行为不承担任何责任。
感谢来自 http://www.devconsole.info 的 @cor3dump3d 给予的支持和帮助。