diff --git a/HTTPy.py b/HTTPy.py index 39bcb77..322f7a0 100755 --- a/HTTPy.py +++ b/HTTPy.py @@ -22,6 +22,7 @@ pingOn = "p" whoOn = "W" phrases = ["ping", "whois", "quit", "clear", "help", "nameserver"] + def openFile(filename): try: myfile = open(filename) @@ -54,14 +55,9 @@ def splitLines(confline): testFile = openFile('.httpy') test = testFile.read() -test1, test2 = splitLines(test) - -for t1 in test1: - print "dig " + t1 - -for t2 in test2: - print "dig " + t2 closeFile(testFile) +rec2check, sub2check = splitLines(test) + def printHelp(): print bcolors.BLUE + "========================================================" @@ -223,6 +219,11 @@ def getInput(): running = 0 #Main Loop +testFile = openFile('~/.httpy') +test = testFile.read() +closeFile(testFile) +rec2check, sub2check = splitLines(test) + while running == 1: getInput() if checkPhrase(inInput) == 1 or len(partDomain) == 1: