From 943ce7d01b7a975a7f174a959f8bc3bf7fb49a97 Mon Sep 17 00:00:00 2001 From: psy Date: Sun, 22 Sep 2013 07:46:52 -0700 Subject: [PATCH] output results text details --- main.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/main.py b/main.py index 9e0ea79..bf70512 100755 --- a/main.py +++ b/main.py @@ -24,7 +24,7 @@ from xml_exporter import xml_reporting import webbrowser # set to emit debug messages about errors (0 = off). -DEBUG = 1 +DEBUG = 0 class bc(object): """ @@ -209,14 +209,14 @@ class bc(object): Set urls to visit """ if self.browser == "F": - #sqlite operation to get the last visited url from history db. + # Sqlite operation to get the last visited url from history db. conn = sqlite3.connect(self.browser_history_path) c = conn.cursor() c.execute('select url, last_visit_date from moz_places ORDER BY last_visit_date DESC') url = c.fetchone() - elif self.browser == "C" or self.browser == "CHROMIUM": #Chrome/Chromium history database - #Hack that makes a copy of the locked database to access it while Chrome is running. - #Removes the copied database afterwards + elif self.browser == "C" or self.browser == "CHROMIUM": # Chrome/Chromium history database + # Hack that makes a copy of the locked database to access it while Chrome is running. + # Removes the copied database afterwards import filecmp # is this a standard module? a = self.browser_history_path + 'Copy' if os.path.exists(a): @@ -489,8 +489,9 @@ class bc(object): print "Error: Browser is not responding correctly.\n" print '='*45 + "\n" - print "Status: Waiting for new urls ...\n" - print "Type 'Control+C' to exit...\n" + print "Status: Waiting for new urls\n" + print "Type 'Control+C' to exit.\n" + print '='*45 + "\n" # stay latent waiting for new urls while True: url = urlparse(self.getURL()).netloc @@ -507,7 +508,7 @@ class bc(object): os.remove('data.xml') open('data.xml', 'w') # starting a new xml data container in write mode traces = self.try_running(self.traces, "\nInternal error tracerouting.") - time.sleep(5) # free process time + time.sleep(5) # free process time or goodbye :-) if __name__ == "__main__": app = bc()