diff --git a/main.py b/main.py index d9dfc3d..493bc91 100755 --- a/main.py +++ b/main.py @@ -322,7 +322,7 @@ class bc(object): print "URL:", self.url[0], "\n" url = urlparse(self.getURL()).netloc #changed this for prototyping - url = url.replace('www.','') #--> doing a tracert to example.com and www.example.com yields different results. + #url = url.replace('www.','') #--> doing a tracert to example.com and www.example.com yields different results. url_ip = socket.gethostbyname(url) self.destination_ip = url_ip print "Host:", url, "\n" @@ -503,7 +503,7 @@ class bc(object): # stay latent waiting for new urls while True: url = urlparse(self.getURL()).netloc - url = url.replace('www.','') + #url = url.replace('www.','') match_ip = url.strip('http://').strip(':8080') if url != self.old_url: if re.match(r'^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$', match_ip) or re.match(r'^10\.\d{1,3}\.\d{1,3}\.\d{1,3}$', match_ip) or re.match(r'^192.168\.\d{1,3}$', match_ip) or re.match(r'^172.(1[6-9]|2[0-9]|3[0-1]).[0-9]{1,3}.[0-9]{1,3}$', match_ip): diff --git a/web/index.py b/web/index.py index d0250ba..f63cd7a 100755 --- a/web/index.py +++ b/web/index.py @@ -40,7 +40,6 @@ for counter in range(1, last_hop+1): hop_ip_list.append(hop_ip.encode('utf-8')) server_name_list.append(server_name.encode('utf-8')) -#f = open('testmap.html', 'w') output = """ @@ -48,7 +47,7 @@ output = """ - +