mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-10-05 06:11:13 +01:00
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:
+5
-3
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user