Created
February 24, 2015 09:09
-
-
Save morhekil/6d3570ad2f59af567642 to your computer and use it in GitHub Desktop.
Example of using httest (http://htt.sourceforge.net) to test availability and configuration of a set of domains
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env httest -be | |
INCLUDE helpers | |
# | |
# Desktop | |
# | |
CLIENT | |
EXPECT_MOVED greenlanterncasino.ru 80 / https://www.greenlanterncasino.ru/ | |
EXPECT_MOVED greenlanterncasino.ru SSL:443 / https://www.greenlanterncasino.ru/ | |
EXPECT_OK www.greenlanterncasino.ru 80 /casino "Green Lantern" | |
EXPECT_OK www.greenlanterncasino.ru SSL:443 /casino "Green Lantern" | |
END | |
CLIENT | |
EXPECT_MOVED greenlanterncasino.eu 80 / https://www.greenlanterncasino.eu/ | |
EXPECT_MOVED greenlanterncasino.eu SSL:443 / https://www.greenlanterncasino.eu/ | |
EXPECT_OK www.greenlanterncasino.eu 80 /casino "Green Lantern" | |
EXPECT_OK www.greenlanterncasino.eu SSL:443 /casino "Green Lantern" | |
END | |
CLIENT | |
EXPECT_MOVED greenlanterncasino.cn 80 / http://www.greenlanterncasino.cn/ | |
EXPECT_MOVED greenlanterncasino.cn SSL:443 / https://www.greenlanterncasino.cn/ | |
EXPECT_OK www.greenlanterncasino.cn 80 /casino "Green Lantern" | |
EXPECT_OK www.greenlanterncasino.cn SSL:443 /casino "Green Lantern" | |
END | |
CLIENT | |
EXPECT_MOVED grnltcasino.ru 80 / http://www.grnltcasino.ru/ | |
EXPECT_MOVED grnltcasino.ru SSL:443 / https://www.grnltcasino.ru/ | |
EXPECT_OK www.grnltcasino.ru 80 /casino "Green Lantern" | |
EXPECT_OK www.grnltcasino.ru SSL:443 /casino "Green Lantern" | |
END | |
CLIENT | |
EXPECT_MOVED grnltcasino.com 80 / http://www.grnltcasino.com/ | |
EXPECT_MOVED grnltcasino.com SSL:443 / https://www.grnltcasino.com/ | |
EXPECT_OK www.grnltcasino.com 80 /casino "Green Lantern" | |
EXPECT_OK www.grnltcasino.com SSL:443 /casino "Green Lantern" | |
END | |
# Mobile | |
CLIENT | |
EXPECT_FOUND m.greenlanterncasino.eu 80 / http://m.greenlanterncasino.eu/casino | |
EXPECT_OK m.greenlanterncasino.eu 80 /casino "Mobile Casino" | |
EXPECT_OK m.greenlanterncasino.eu SSL:443 /casino "Mobile Casino" | |
END | |
CLIENT | |
EXPECT_FOUND m.greenlanterncasino.ru 80 / http://m.greenlanterncasino.ru/casino | |
EXPECT_OK m.greenlanterncasino.ru 80 /casino "Mobile Casino" | |
EXPECT_OK m.greenlanterncasino.ru SSL:443 /casino "Mobile Casino" | |
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BLOCK EXPECT_MOVED host port url location | |
_REQ $host $port | |
__GET $url HTTP/1.1 | |
__Host: $host | |
__ | |
_EXPECT . "301 Moved Permanently" | |
_EXPECT . "Location: $location" | |
_WAIT | |
END | |
BLOCK EXPECT_FOUND host port url location | |
_REQ $host $port | |
__GET $url HTTP/1.1 | |
__Host: $host | |
__ | |
_EXPECT . "302 Found" | |
_EXPECT . "Location: $location" | |
_WAIT | |
END | |
BLOCK EXPECT_OK host port url response | |
_REQ $host $port | |
__GET $url HTTP/1.1 | |
__Host: $host | |
__ | |
_EXPECT . "200 OK" | |
_EXPECT . "$response" | |
_WAIT | |
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: | |
./poker.htt | |
./casino.htt | |
./sports.htt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env httest -be | |
INCLUDE helpers | |
# Desktop | |
CLIENT | |
EXPECT_MOVED greenlanternpoker.ru 80 / https://www.greenlanternpoker.ru/ | |
EXPECT_MOVED greenlanternpoker.ru SSL:443 / https://www.greenlanternpoker.ru/ | |
EXPECT_OK www.greenlanternpoker.ru 80 / "Green Lantern" | |
EXPECT_OK www.greenlanternpoker.ru SSL:443 / "Green Lantern" | |
END | |
CLIENT | |
EXPECT_MOVED greenlanternpoker.com 80 / http://www.greenlanternpoker.com/ | |
EXPECT_OK www.greenlanternpoker.com 80 / "Green Lantern" | |
EXPECT_OK www.greenlanternpoker.com SSL:443 / "Green Lantern" | |
END | |
CLIENT | |
EXPECT_MOVED greenlanternpoker.eu 80 / https://www.greenlanternpoker.eu/ | |
EXPECT_MOVED greenlanternpoker.eu SSL:443 / https://www.greenlanternpoker.eu/ | |
EXPECT_OK www.greenlanternpoker.eu 80 / "Green Lantern" | |
EXPECT_OK www.greenlanternpoker.eu SSL:443 / "Green Lantern" | |
END | |
CLIENT | |
EXPECT_MOVED greenlanternpoker.cn 80 / http://www.greenlanternpoker.com/ | |
EXPECT_OK www.greenlanternpoker.cn 80 / "Green Lantern" | |
EXPECT_OK www.greenlanternpoker.cn SSL:443 / "Green Lantern" | |
END | |
CLIENT | |
EXPECT_MOVED greenlanterngames.ru 80 / http://www.greenlanterngames.ru/ | |
EXPECT_MOVED greenlanterngames.ru SSL:443 / https://www.greenlanterngames.ru/ | |
EXPECT_OK www.greenlanterngames.ru 80 / "Green Lantern" | |
EXPECT_OK www.greenlanterngames.ru SSL:443 / "Green Lantern" | |
END | |
# Mobile | |
CLIENT | |
EXPECT_FOUND m.greenlanternpoker.eu 80 / http://m.greenlanternpoker.eu/poker | |
EXPECT_OK m.greenlanternpoker.eu 80 /poker "Mobile Poker" | |
EXPECT_OK m.greenlanternpoker.eu SSL:443 /poker "Mobile Poker" | |
END | |
CLIENT | |
EXPECT_FOUND m.greenlanternpoker.ru 80 / http://m.greenlanternpoker.ru/poker | |
EXPECT_OK m.greenlanternpoker.ru 80 /poker "Mobile Poker" | |
EXPECT_OK m.greenlanternpoker.ru SSL:443 /poker "Mobile Poker" | |
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env httest -be | |
INCLUDE helpers | |
# Desktop | |
CLIENT | |
EXPECT_OK www.greenlanternsports.ru 80 / "Sports Bets" | |
EXPECT_OK www.greenlanternsports.ru SSL:443 / "Sports Bets" | |
EXPECT_OK greenlanternsports.ru 80 / "Sports Bets" | |
EXPECT_OK greenlanternsports.ru SSL:443 / "Sports Bets" | |
END | |
CLIENT | |
EXPECT_OK www.greenlanternsports.eu 80 / "Sports Bets" | |
EXPECT_OK www.greenlanternsports.eu SSL:443 / "Sports Bets" | |
EXPECT_OK greenlanternsports.eu 80 / "Sports Bets" | |
EXPECT_OK greenlanternsports.eu SSL:443 / "Sports Bets" | |
END | |
CLIENT | |
EXPECT_OK www.greenlanternsports.cn 80 / "Sports Bets" | |
EXPECT_OK www.greenlanternsports.cn SSL:443 / "Sports Bets" | |
EXPECT_OK greenlanternsports.cn 80 / "Sports Bets" | |
EXPECT_OK greenlanternsports.cn SSL:443 / "Sports Bets" | |
END | |
CLIENT | |
EXPECT_OK www.greenlanternbets.ru 80 / "Sports Bets" | |
EXPECT_OK www.greenlanternbets.ru SSL:443 / "Sports Bets" | |
EXPECT_OK greenlanternbets.ru 80 / "Sports Bets" | |
EXPECT_OK greenlanternbets.ru SSL:443 / "Sports Bets" | |
END | |
# Mobile | |
CLIENT | |
EXPECT_OK m.greenlanternsports.eu 80 / "Greenlantern Mobile" | |
EXPECT_OK m.greenlanternsports.eu SSL:443 / "Greenlantern Mobile" | |
END | |
CLIENT | |
EXPECT_OK m.greenlanternsports.ru 80 / "Greenlantern Mobile" | |
EXPECT_OK m.greenlanternsports.ru SSL:443 / "Greenlantern Mobile" | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment