From 165fa6e952d8f2047df567e75c4d9046c7365288 Mon Sep 17 00:00:00 2001 From: rscmbbng Date: Wed, 18 Sep 2013 20:36:55 +0200 Subject: [PATCH] Code checkpoint + removed a js file and made minute changes --- main.py | 4 +- web/index.py | 5 +- web/js/opendatacity.js | 228 ------------------ ...ayer-mod.min.js => rlayer-modified.min.js} | 0 4 files changed, 3 insertions(+), 234 deletions(-) delete mode 100644 web/js/opendatacity.js rename web/js/{rlayer-mod.min.js => rlayer-modified.min.js} (100%) 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 = """ - +