Skip to content

Instantly share code, notes, and snippets.

@niccokunzmann
Last active June 2, 2016 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niccokunzmann/c3fdde98b3bdca3e1fc7a23e81f5e2a5 to your computer and use it in GitHub Desktop.
Save niccokunzmann/c3fdde98b3bdca3e1fc7a23e81f5e2a5 to your computer and use it in GitHub Desktop.
rotespotsdam.tk: 91.203.147.147 (should be 91.203.147.147)
google.de: 216.58.213.3
--- (1) requesting now google.de ---
'<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="de"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/logos/doodles/2016/lotte-reinigers-117th-birthday-5079873255112704-hp.gif" itemprop="image"><meta content="117. Geburtstag von Lotte Reiniger #GoogleDoodle" property="og:description"><meta content="http://www.google.com/logos/doodles/2016/lotte-reinigers-117th-birthday-5079873255112704.5-thp.png" property="og:image"><meta content="391" property="og:image:width"><meta content="220" property="og:image:height"><title>Google</title><script>(function(){window.google={kEI:\'XvlPV46IHerA6ASUzJ7YBA\',kEXPI:\'1350654,1350876,1350948,3700290,3700389,4029815,4031109,4032678,4036509,4036527,4038012,4039268,4043492,4045841,4048347,4052305,4054551,4056038,4057739,4058335,4058720,4059767,4061155,4061180,4061552,4062331,4062706,4062972,4062987,4063112,4063126,4063879,4063960,4064449,4064501,4064702,4064816,4064904,4064931,4065153,4065406,4065595,4065675,4065787'
--- (2) requesting now google.de at 91.203.147.147 ---
'<html><head><title>Shared IP</title></head>\n<body><center>This IP is being shared among many domains.<br>\nTo view the domain you are looking for, simply enter the domain name in the location bar of your web browser.<br>\n</center></body>\n</html>'
--- (3) requesting now rotespotsdam.tk ---
'<html>\r\n<head>\r\n<title>Web Page Blocked</title>\r\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r\n<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">\r\n<meta name="viewport" content="initial-scale=1.0">\r\n<style>\r\n #content {\r\n border:3px solid#aaa;\r\n background-color:#fff;\r\n margin:1.5em;\r\n padding:1.5em;\r\n font-family:Tahoma,Helvetica,Arial,sans-serif;\r\n font-size:1em;\r\n }\r\n h1 {\r\n font-size:1.3em;\r\n font-weight:bold;\r\n color:#196390;\r\n }\r\n b {\r\n font-weight:normal;\r\n color:#196390;\r\n }\r\n</style>\r\n</head>\r\n<body bgcolor="#e7e8e9">\r\n<div id="content">\r\n<h1>Web Page Blocked</h1>\r\n<p>Access to the web page you were trying to visit has been blocked in accordance with company policy. Please contact your system administrator if you believe this is in error.</p>\r\n<p><b>User:</b> 141.89.251.52 </p>\r\n<p><b>URL:</b> rotespotsdam.tk/ </p>\r\n<p><b>Category:</b> block-list </p>\r\n</div>\r\n</body>\r\n</html>\r\n'
--- (4) requesting now rotespotsdam.tk at 216.58.213.3 ---
'<html>\r\n<head>\r\n<title>Web Page Blocked</title>\r\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r\n<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">\r\n<meta name="viewport" content="initial-scale=1.0">\r\n<style>\r\n #content {\r\n border:3px solid#aaa;\r\n background-color:#fff;\r\n margin:1.5em;\r\n padding:1.5em;\r\n font-family:Tahoma,Helvetica,Arial,sans-serif;\r\n font-size:1em;\r\n }\r\n h1 {\r\n font-size:1.3em;\r\n font-weight:bold;\r\n color:#196390;\r\n }\r\n b {\r\n font-weight:normal;\r\n color:#196390;\r\n }\r\n</style>\r\n</head>\r\n<body bgcolor="#e7e8e9">\r\n<div id="content">\r\n<h1>Web Page Blocked</h1>\r\n<p>Access to the web page you were trying to visit has been blocked in accordance with company policy. Please contact your system administrator if you believe this is in error.</p>\r\n<p><b>User:</b> 141.89.251.52 </p>\r\n<p><b>URL:</b> rotespotsdam.tk/ </p>\r\n<p><b>Category:</b> block-list </p>\r\n</div>\r\n</body>\r\n</html>\r\n'
rotespotsdam.tk: 91.203.147.147 (should be 91.203.147.147)
google.de: 216.58.210.3
--- (1) requesting now google.de ---
'<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="de"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/logos/doodles/2016/lotte-reinigers-117th-birthday-5079873255112704-hp.gif" itemprop="image"><meta content="117. Geburtstag von Lotte Reiniger #GoogleDoodle" property="og:description"><meta content="http://www.google.com/logos/doodles/2016/lotte-reinigers-117th-birthday-5079873255112704.5-thp.png" property="og:image"><meta content="391" property="og:image:width"><meta content="220" property="og:image:height"><title>Google</title><script>(function(){window.google={kEI:\'H_lPV4CyNYLsUvj5peAE\',kEXPI:\'1350654,1350947,3700062,3700278,3700389,4026241,4028875,4029815,4031109,4032677,4036509,4036527,4038012,4039268,4043492,4045841,4048347,4052304,4053843,4053845,4053847,4054552,4056038,4057739,4058337,4059767,4061155,4061181,4061552,4061945,4062332,4062972,4062987,4063112,4063126,4063879,4063960,4064131,4064449,4064501,4064904,4064931,4065153,4065406,4'
--- (2) requesting now google.de at 91.203.147.147 ---
'<html><head><title>Shared IP</title></head>\n<body><center>This IP is being shared among many domains.<br>\nTo view the domain you are looking for, simply enter the domain name in the location bar of your web browser.<br>\n</center></body>\n</html>'
--- (3) requesting now rotespotsdam.tk ---
'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml">\n <head>\n<title>Rotes Potsdam | Home</title>\n <style type="text/css">\n\ta:link { text-decoration:none; }\n\ta:visited { text-decoration:none; }\n\ta:focus { text-decoration:none; }\n\ta:hover { text-decoration:underline; color:white;}\n\ta:active { text-decoration:underline; }\n </style>\n<meta name="description" content="Alternative Termine zwischen Stadtschloss und Garnisonkirche">\n<meta name="keywords" content="Termin, Termine, Veranstaltungen, Terminkalender, Kalender, Potsdam, Info, Information, Adressen">\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n<link rel="SHORTCUT ICON" href="icon.ico" type="image/x-icon">\n<link rel="stylesheet" type="text/css" href="style.css" />\n</head>\n\n<body>\n\n<div id="container">\n\n<div id="header"></div>\n\n<div id="navcontainer">\n<ul id="navlist">\n<li><a href="index.php">Home</a></li>\n<li><a'
--- (4) requesting now rotespotsdam.tk at 216.58.210.3 ---
'<!DOCTYPE html>\n<html lang=en>\n <meta charset=utf-8>\n <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">\n <title>Error 404 (Not Found)!!1</title>\n <style>\n *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/brandi'
import requests
import socket
rp = socket.gethostbyname("rotespotsdam.tk")
print("rotespotsdam.tk: {} (should be 91.203.147.147)".format(rp))
gg = socket.gethostbyname("google.de")
print("google.de: {}".format(gg))
print("--- (1) requesting now google.de ---")
print(repr(requests.get("http://google.de/").text[:1024]))
print("--- (2) requesting now google.de at {} ---".format(rp))
print(repr(requests.get("http://{}/".format(rp), headers={'host': "google.de"}).text[:1024]))
print()
print("--- (3) requesting now rotespotsdam.tk ---")
print(repr(requests.get("http://rotespotsdam.tk/").text[:1024]))
print("--- (4) requesting now rotespotsdam.tk at {} ---".format(gg))
print(repr(requests.get("http://{}/".format(gg), headers={'host': "rotespotsdam.tk"}).text[:1024]))
print()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment