From 9ae8cabfaa0eb39069ba4914274f20c1687b0979 Mon Sep 17 00:00:00 2001 From: Benajmyn Love Date: Mon, 25 Sep 2017 09:21:24 +1000 Subject: [PATCH] Made pretty --- HTTPy.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/HTTPy.py b/HTTPy.py index 211ed51..7f40125 100755 --- a/HTTPy.py +++ b/HTTPy.py @@ -22,7 +22,7 @@ running = 1 pingOn = "p" whoOn = "W" phrases = ["ping", "whois", "quit", "clear", "help", "nameserver"] -indent = '\t' +indent = '> ' def openFile(filename): try: @@ -142,7 +142,7 @@ def iterate(inArray, pre): print indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET + " -> " + bcolors.GREEN + tmpVal[0] + bcolors.RESET else: - print bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET + print indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET count = count + 1 @@ -151,7 +151,7 @@ def iterateMX(inArray, pre): while count != len(inArray) - 1: tmp = inArray[count].split(' ') tmpVal = isCNAME(tmp[1]) - print bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET + " -> " + bcolors.GREEN + tmpVal[0] + bcolors.RESET + print indent + bcolors.CYAN + pre, bcolors.GREEN + inArray[count] + bcolors.RESET + " -> " + bcolors.GREEN + tmpVal[0] + bcolors.RESET count = count + 1 def parseWhois(whioisInfo): @@ -169,14 +169,14 @@ def parseWhois(whioisInfo): if "domain" in str or "Domain" in str and "Name" not in str or "Status" in str: if "name" not in str and "ID" not in str: if "ok" in str or "OK" in str: - print bcolors.GREEN + str + bcolors.RESET + print indent + bcolors.GREEN + str + bcolors.RESET else: - print bcolors.RED + str + bcolors.RESET + print indent + bcolors.RED + str + bcolors.RESET else: if "Expired" in str or "expired" in str: - print bcolors.RED + str + bcolors.RESET + print indent + bcolors.RED + str + bcolors.RESET else: - print str + print indent + str def whois(inDomain): lookup = subprocess.check_output(["whois", inDomain])