This speaks for itself. It’s a simple script I made to test whether two servers are serving roughly the same content.
kkinder@lappy ~/utils> ./server_diff -h usage: server_diff [-h] [--diff-command DIFF] [--username USERNAME] [--password PASSWORD] SERVER1 SERVER2 URL [URL ...] Tests URL against two servers and shows the output. positional arguments: SERVER1 First server SERVER2 second server URL URL(s) to test optional arguments: -h, --help show this help message and exit --diff-command DIFF Application to use for showing diff --username USERNAME Username (for http authentication) --password PASSWORD Password. If username is specified, but password is not, user will be prompted.
Then run something like this:
kkinder@lappy ~/utils> ./server_diff --div-command meld --username kkinder --password YOURMOM \ https://beta.example.com/ https://production.example.com/ \ / /about /url2 "/search?x=1" Fetching https://beta.example.com/ Fetching https://production.example.com/ /: identical Fetching https://beta.example.com/about Fetching https://production.example.com/about
At this point, if the /about page is different, meld would be launched, showing the differences. After you exit meld, it would continue to the next URL.
Notably, this script does not:
- Handle methods other than GET
- Deal with headers.
- Recognize substantive vs superfluous differences in HTML (whitespace, etc).
- Download it here: server_diff.zip (Python script, MIT licensed)