Issue #75: pass-in the target IP address as an option.

Use option --ip nnn.nnn.nnn.nnn or -i nnn.nnn.nnn.nnn to specify the IP address you want in the amalgamated hosts file.
This commit is contained in:
Steven Black
2016-02-15 17:06:38 -05:00
parent 35a16da7a1
commit af4c7865b5
+5 -3
View File
@@ -93,16 +93,18 @@ COMMON_EXCLUSIONS = ['hulu.com']
exclusionRegexs = []
numberOfRules = 0
auto = False
verbose = True
targetIP = '0.0.0.0'
targetIP = "0.0.0.0"
def main():
parser = argparse.ArgumentParser(description="Creates an amalgamated hosts file from hosts stored in data subfolders.")
parser.add_argument("--auto", "-a", dest="auto", default=False, action='store_true', help="Run without prompting.")
parser.add_argument("--ip", "-i", dest="targetIP", default="0.0.0.0", help="Target IP address. Default is 0.0.0.0")
args = parser.parse_args()
global auto, verbose
global auto, targetIP
auto = args.auto
targetIP = args.targetIP
promptForUpdate()
promptForExclusions()