From 8e8c5ccccbe1c5ee3b2e884f74704de8ccd98fe4 Mon Sep 17 00:00:00 2001 From: psy Date: Mon, 16 Sep 2013 10:22:08 -0700 Subject: [PATCH] fixed identation on main --- main.py | 71 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/main.py b/main.py index b009572..970d667 100755 --- a/main.py +++ b/main.py @@ -267,48 +267,46 @@ class bc(object): # sys.exit(2) def lft_parse(self): - """ - Parse the lft to see if it produced any results, if not, run another LFT using a different method - """ - - - output = self.content.splitlines() + """ + Parse the lft to see if it produced any results, if not, run another LFT using a different method + """ + output = self.content.splitlines() - if output[-1] == "** [80/tcp no reply from target] Try advanced options (use -VV to see packets).": - if self.options.debug == True: - print 'TCP method doesn''t work, switching to UDP \n' - self.method = '-u' - time.sleep(2) - self.lft() + if output[-1] == "** [80/tcp no reply from target] Try advanced options (use -VV to see packets).": + if self.options.debug == True: + print 'TCP method doesn''t work, switching to UDP \n' + self.method = '-u' + time.sleep(2) + self.lft() - if '[target closed]' in output[-1] and self.method == '-e' or self.method == '-E': - if self.options.debug == True: - print 'Target closed, retrying with UDP \n' - self.method = '-u' - time.sleep(2) - self.lft() + if '[target closed]' in output[-1] and self.method == '-e' or self.method == '-E': + if self.options.debug == True: + print 'Target closed, retrying with UDP \n' + self.method = '-u' + time.sleep(2) + self.lft() - if '[target open]' in output[-1] and len(output) < 5: - if self.options.debug == True: - print 'Target open, but filtered. Retrying with UDP \n' - self.method = '-u' - time.sleep(2) - self.lft() + if '[target open]' in output[-1] and len(output) < 5: + if self.options.debug == True: + print 'Target open, but filtered. Retrying with UDP \n' + self.method = '-u' + time.sleep(2) + self.lft() - if 'udp no reply from target] Use -VV to see packets.' in output[-1] and len(output) > 5: - if self.options.debug == True: - print 'Trace ended with results \n' - return + if 'udp no reply from target] Use -VV to see packets.' in output[-1] and len(output) > 5: + if self.options.debug == True: + print 'Trace ended with results \n' + return - if '[port unreachable]' in output[-1]: - if self.options.debug == True: - print 'Port unreachable \n' - return + if '[port unreachable]' in output[-1]: + if self.options.debug == True: + print 'Port unreachable \n' + return - if '[target open]' in output[-1] and len(output) > 5: - if self.options.debug == True: - print 'Target open, with results \n' - return + if '[target open]' in output[-1] and len(output) > 5: + if self.options.debug == True: + print 'Target open, with results \n' + return def traces(self): ''' @@ -397,6 +395,7 @@ class bc(object): if self.options.debug == True: logfile.close() self.old_url = url + print "\n" self.hop_count = 0 # to start a new map return