Skip to content
Andrew Horton edited this page Jun 11, 2019 · 4 revisions

Example Usage

Examples of how to use WhatWeb to scan.

Using WhatWeb to scan reddit.com.

$ ./whatweb reddit.com
http://reddit.com [301 Moved Permanently] Country[UNITED STATES][US], HTTPServer[snooserv], IP[151.101.65.140], RedirectLocation[https://www.reddit.com/], UncommonHeaders[retry-after,x-served-by,x-cache-hits,x-timer], Via-Proxy[1.1 varnish]
https://www.reddit.com/ [200 OK] Cookies[edgebucket,eu_cookie_v2,loid,rabt,rseor3,session_tracker,token], Country[UNITED STATES][US], Email[banner@2x.png,snoo-home@2x.png], Frame, HTML5, HTTPServer[snooserv], HttpOnly[token], IP[151.101.37.140], Open-Graph-Protocol[website], Script[text/javascript], Strict-Transport-Security[max-age=15552000; includeSubDomains; preload], Title[reddit: the front page of the internet], UncommonHeaders[fastly-restarts,x-served-by,x-cache-hits,x-timer], Via-Proxy[1.1 varnish], X-Frame-Options[SAMEORIGIN]

Scan a single website

whatweb example.com

This is the simplest way to scan a website. Specify a URL on the command-line.

Scan multiple websites

whatweb reddit.com slashdot.org twitter.com

You can scan multiple websites by specifying the URLs on the commandline

Scan a list of URLs from a file

whatweb --input-file list.txt

You can scan the URLs specified in list.txt.

whatweb -i list.txt

It is faster to just type -i than --input-list.

Pipe a list of URLs on STDIN

echo -e "facebook.com\ninstagram.com\ntwitter.com" | ./whatweb -i /dev/stdin

In this case we are using -i (--input-file) to read from a file but the file is /dev/stdin. This lets use pipe in URLs from another source.

Verbose output

If you want verbose output that describes what the plugins mean, use -v.

whatweb --verbose reddit.com

It is faster to type -v than --verbose.

whatweb -v reddit.com

Really verbose output

You can specify --verbose twice to get even more information. This shows us how each plugin is matched and is especially helpful for debugging plugins.

In this example we use use -vv instead of -v -v or even --verbose --verbose.

whatweb -vv reddit.com

Aggressive scans

Set the aggressive mode to 3 (Aggressive). If any plugins match in passive mode, then the aggressive tests for the plugin will be triggered. This is very useful in version detection.

whatweb --aggression 3 www.wired.com

It is faster to type -a than --aggressive.

whatweb -a 3 www.wired.com

Scan a network range

whatweb --no-errors 192.168.0.0/24

You can specify network ranges. In this example we want to scan the local RFC1918 IP addresses from 192.168.0.0 to 192.168.0.255. This range is represented as 192.168.0.0/24.

We have added --no-errors to suppress the errors for every IP address that does not have a web server.

Scanning a network range for https websites

We are adding a prefix to every URL. In this case the prefix is https://.

whatweb --no-errors --url-prefix https:// 192.168.0.0/24

Scan for crossdomain policies in the Alexa Top 1000.

In this case we are adding a URL suffix to specify a URL path of /crossdomain.xml.

We are reading a list of hostnames from the file plugin-development/alexa-top-100.txt. /crossdomain.xml will be appended to each hostname.

whatweb -i plugin-development/alexa-top-100.txt --url-suffix /crossdomain.xml -p crossdomain_xml

More Examples

If the type of usage you are seeking is not listed here then open an issue to ask for suggestions.