From 18b0177e18fceaef62b793a9aa9493fa22b19812 Mon Sep 17 00:00:00 2001 From: psy Date: Mon, 9 Sep 2013 12:11:51 -0700 Subject: [PATCH] fixed some merge problems --- main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.py b/main.py index 4edf6a7..f263665 100644 --- a/main.py +++ b/main.py @@ -40,6 +40,10 @@ class bc(object): self.browser_version = "" self.url = "" self.old_url = "" + self.ip = "" + self.city = "" + self.country = "" + self.routes = "" def set_options(self, options): """ @@ -223,6 +227,7 @@ class bc(object): 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_ip = socket.gethostbyname(url) + self.ip = url_ip print "Host:", url, "\n" if self.options.debug == True: print "Host ip:", url_ip, "\n" @@ -275,10 +280,15 @@ class bc(object): city = record['city'] print "Trace:", count, "->", ip, "->", city, "->", country count+=1 + self.city = city + self.country = country + self.routes = "Trace:", count, "->", ip, "->", city, "->", country elif record.has_key('country_name'): country = record['country_name'] print "Trace:", count, "->", ip, "->", country count+=1 + self.country = country + self.routes = "Trace:", count, "->", ip, "->", country except: print "Trace:", count, "->", "Not allowed" count+=1