Module ImportFrom alias alias alias alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias TryExcept body ImportFrom alias alias ImportFrom alias alias ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias ImportFrom alias ImportFrom alias alias alias Assign NameStore CompareGtE AttributeLoad NameLoad attr TupleLoad Num Num FunctionDef arguments args NameParam defaults body TryExcept body Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad Call AttributeLoad NameLoad attr attr Str handlers ExceptHandler body Expr Call NameLoad Str NameLoad decorator_list FunctionDef arguments args NameParam defaults Str body If NameLoad body Return Call NameLoad NameLoad orelse Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str decorator_list Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Num Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad NameLoad NameLoad NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str ListLoad Str Str Str Str Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Dict Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str ListLoad ListLoad ListLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword ListLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str keyword Str Global identifier Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str UnaryOpNot SubscriptLoad NameLoad Index Str Assign NameStore Dict Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str ListComp Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad comprehension NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign SubscriptStore NameLoad Index Str Call NameLoad Call NameLoad Call AttributeLoad Call NameLoad SubscriptLoad NameLoad Index Str attr SubscriptLoad NameLoad Index Str With Call NameLoad SubscriptLoad NameLoad Index Str Str NameStore body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Expr Call NameLoad Assign NameStore Call NameLoad Expr Call NameLoad Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad Expr Call NameLoad Expr Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str SubscriptLoad NameLoad Index Str Str Call AttributeLoad Str attr SubscriptLoad NameLoad Index Str Str Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str body TryExcept body Expr Call AttributeLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str attr handlers ExceptHandler body Expr Call NameLoad Str If UnaryOpNot SubscriptLoad NameLoad Index Str body Return Assign NameStore IfExp SubscriptLoad NameLoad Index Str Str Call NameLoad Str If CompareEq NameLoad Str body Expr Call NameLoad orelse If UnaryOpNot SubscriptLoad NameLoad Index Str body Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Assign NameStore IfExp SubscriptLoad NameLoad Index Str Str Call NameLoad BinOpAdd BinOpAdd Str Str Str If CompareEq NameLoad Str body Expr Call NameLoad orelse If UnaryOpNot SubscriptLoad NameLoad Index Str body Expr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults Str body Return CompareEq Call NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body If BoolOpAnd SubscriptLoad NameLoad Index Str UnaryOpNot SubscriptLoad NameLoad Index Str body Assign NameStore Str orelse Assign NameStore IfExp BoolOpOr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Str Call NameLoad BinOpAdd Str Str If CompareEq NameLoad Str body Expr Call NameLoad NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args defaults body For NameStore SubscriptLoad NameLoad Index Str body Assign NameStore Call NameLoad BinOpAdd BinOpAdd Str NameLoad Str If CompareEq NameLoad Str body Expr Call NameLoad NameLoad orelse Continue Assign NameStore Call NameLoad Str If CompareEq NameLoad Str body Expr Call NameLoad decorator_list FunctionDef arguments args defaults body While NameLoad body Assign NameStore Call NameLoad Str If Call NameLoad NameLoad body Expr Call NameLoad NameLoad If UnaryOpNot Call NameLoad body Return decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Call AttributeLoad NameLoad attr BinOpAdd SubscriptLoad NameLoad Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num For NameStore SubscriptLoad NameLoad Index Str body If Call AttributeLoad NameLoad attr NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad BinOpBitOr Call NameLoad SubscriptLoad NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str For NameStore NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body For NameStore Call NameLoad NameLoad body Expr Call NameLoad BinOpAdd BinOpAdd BinOpAdd Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameLoad Assign NameStore Call NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str NameLoad SubscriptLoad NameLoad Index Str Str Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr handlers ExceptHandler body Expr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str NameLoad SubscriptLoad NameLoad Index Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr orelse Assign NameStore NameLoad Expr Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str NameLoad SubscriptLoad NameLoad Index Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body With Call NameLoad NameLoad Str NameStore body Return Call AttributeLoad Call AttributeLoad NameLoad attr attr Expr Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str Str NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr For NameStore SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str NameLoad SubscriptLoad NameLoad Index Str With Call NameLoad NameLoad Str NameStore body Expr Call NameLoad NameLoad Call AttributeLoad NameLoad attr For NameStore SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str NameLoad SubscriptLoad NameLoad Index Str With Call NameLoad NameLoad Str NameStore body Expr Call NameLoad NameLoad Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad NameLoad Index Str If Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str body With Call NameLoad SubscriptLoad NameLoad Index Str Str NameStore body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str If BoolOpAnd NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str Str IfExp NameLoad Str Str Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad NameLoad Index Str For NameStore Call AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr Str If BoolOpOr CompareEq SubscriptLoad NameLoad Index Num Str Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Num body Expr Call NameLoad NameLoad NameLoad Continue If CompareIn Str NameLoad body Continue Assign NameStore Call NameLoad NameLoad If BoolOpOr UnaryOpNot NameLoad Call NameLoad NameLoad body Continue Assign TupleStore NameStore NameStore Call NameLoad NameLoad For NameStore NameLoad body If CompareIn NameLoad NameLoad body Assign NameStore Str Break If BoolOpAnd NameLoad CompareNotIn NameLoad NameLoad CompareEq NameLoad Str body Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Num Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr If NameLoad body Return TupleLoad NameLoad BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Str NameLoad NameLoad orelse Return TupleLoad NameLoad BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Str NameLoad Expr Call NameLoad BinOpMod Str NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If CompareLt Call NameLoad NameLoad Num body Return Str orelse Return BinOpAdd BinOpAdd SubscriptLoad NameLoad Index Num Str SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call NameLoad NameLoad Str Expr Call NameLoad NameLoad Str Expr Call NameLoad NameLoad BinOpAdd BinOpAdd Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str If SubscriptLoad NameLoad Index Str body Expr Call NameLoad NameLoad BinOpAdd BinOpAdd Str Call AttributeLoad Str attr SubscriptLoad NameLoad Index Str Str Expr Call NameLoad NameLoad BinOpAdd Str Call AttributeLoad Str attr SubscriptLoad NameLoad Index Str Expr Call NameLoad NameLoad BinOpAdd BinOpAdd Str Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str Str Str Expr Call NameLoad NameLoad Str Expr Call NameLoad NameLoad Str Expr Call NameLoad NameLoad Str If UnaryOpNot SubscriptLoad NameLoad Index Str body Expr Call NameLoad NameLoad Str Expr Call NameLoad NameLoad Str Expr Call NameLoad NameLoad Str Expr Call NameLoad NameLoad Str Expr Call NameLoad NameLoad Str Expr Call NameLoad NameLoad Str If CompareEq Call AttributeLoad NameLoad attr Str body Expr Call NameLoad NameLoad BinOpAdd BinOpAdd Str Call AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body With Call NameLoad NameLoad Str NameStore body Expr Call NameLoad NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Str If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad Str attr SubscriptLoad NameLoad Index Str Assign NameStore Dict Str Str Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str Str SubscriptLoad NameLoad Index Str Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad NameLoad With Call NameLoad SubscriptLoad NameLoad Index Str Str NameStore body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore NameLoad Expr Call NameLoad BinOpAdd Str Str If Call AttributeLoad NameLoad attr ListLoad Str Str Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str body Expr Call NameLoad Str Expr Call NameLoad Str If CompareEq Call AttributeLoad NameLoad attr Str body Assign NameStore NameLoad If Call AttributeLoad NameLoad attr ListLoad Str Str Str Str body Expr Call NameLoad Str orelse If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore NameLoad If Call AttributeLoad NameLoad attr ListLoad Str Str Str body Expr Call NameLoad Str orelse Expr Call NameLoad Str If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore NameLoad If Call AttributeLoad NameLoad attr ListLoad Str Str Str Str body Expr Call NameLoad Str orelse Expr Call NameLoad Str If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore NameLoad If Call AttributeLoad NameLoad attr ListLoad Str Str Str Str body Expr Call NameLoad Str orelse Expr Call NameLoad Str If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore NameLoad If Call AttributeLoad NameLoad attr ListLoad Str Str Str Str body Expr Call NameLoad Str orelse Expr Call NameLoad Str If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore NameLoad If Call AttributeLoad NameLoad attr ListLoad Str Str Str Str body Expr Call NameLoad Str orelse Expr Call NameLoad Str If UnaryOpNot NameLoad body Expr Call NameLoad Str orelse If CompareEq AttributeLoad NameLoad attr Str body Expr Call NameLoad Str Expr Call NameLoad Str decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad Call NameLoad NameLoad Str attr If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad Str attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad Str attr decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str If CompareIs NameLoad NameLoad body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str orelse Raise Call NameLoad BinOpMod Str NameLoad While Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Call NameLoad attr If BoolOpAnd CompareIsNot NameLoad NameLoad CompareEq NameLoad Str body Return NameLoad orelse If CompareIn NameLoad Call AttributeLoad NameLoad attr body Return SubscriptLoad NameLoad Index NameLoad orelse Expr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body If CompareEq NameLoad Str body Expr Call NameLoad Str Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str Str Return NameLoad orelse Return NameLoad decorator_list ClassDef bases body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return BinOpAdd BinOpAdd NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A __future__ absolute_import division print_function unicode_literals N/A os N/A platform N/A re N/A shutil N/A string N/A subprocess N/A sys N/A tempfile N/A time N/A glob N/A argparse N/A socket N/A json N/A N/A urllib.parse urlparse urlencode urllib.request urlopen Request urllib.error HTTPError N/A N/A N/A ImportError N/A urlparse urlparse urllib urlencode urllib2 urlopen Request HTTPError N/A Python3 N/A N/A sys version_info N/A 3 0 getFileByUrl N/A N/A url N/A N/A N/A N/A N/A f N/A urlopen url N/A N/A N/A N/A N/A f read decode UTF-8 N/A N/A N/A N/A N/A print Problem getting file:  url N/A myInput N/A N/A msg N/A N/A N/A Python3 N/A N/A N/A input msg N/A N/A N/A raw_input msg N/A writeData N/A N/A f data N/A N/A N/A Python3 N/A N/A N/A N/A f write N/A bytes data UTF-8 N/A N/A N/A N/A f write N/A N/A N/A str data encode UTF-8 N/A listdir_nohidden N/A N/A path N/A N/A N/A N/A N/A glob glob N/A N/A N/A os path join path * N/A N/A BASEDIR_PATH N/A N/A N/A os path dirname N/A N/A N/A os path realpath __file__ N/A defaults N/A numberofrules datapath freshen replace backup skipstatichosts extensionspath extensions outputsubfolder datafilenames targetip updateurlfilename readmefilename readmetemplate readmedata readmedatafilename exclusionpattern exclusionregexs exclusions commonexclusions whitelistfile 0 N/A N/A N/A os path join BASEDIR_PATH data True False False False N/A N/A N/A os path join BASEDIR_PATH extensions N/A hosts 0.0.0.0 update.info readme.md N/A N/A N/A os path join BASEDIR_PATH readme_template.md N/A N/A N/A N/A os path join BASEDIR_PATH readmeData.json ([a-zA-Z\d-]+\.){0,} N/A N/A N/A hulu.com N/A N/A N/A os path join BASEDIR_PATH whitelist main N/A N/A N/A N/A N/A parser N/A N/A argparse ArgumentParser description Creates a unified hosts file from hosts stored in data subfolders. N/A N/A N/A parser add_argument --auto -a dest auto default False action store_true help Run without prompting. N/A N/A N/A parser add_argument --backup -b dest backup default False action store_true help Backup the hosts files before they are overridden. N/A N/A N/A parser add_argument --extensions -e dest extensions default N/A nargs * help Host extensions to include in the final hosts file. N/A N/A N/A parser add_argument --ip -i dest targetip default 0.0.0.0 help Target IP address. Default is 0.0.0.0. N/A N/A N/A parser add_argument --noupdate -n dest noupdate default False action store_true help Don't update from host data sources. N/A N/A N/A parser add_argument --skipstatichosts -s dest skipstatichosts default False action store_true help Skip static localhost entries in the final hosts file. N/A N/A N/A parser add_argument --output -o dest outputsubfolder default help Output subfolder for generated hosts file. N/A N/A N/A parser add_argument --replace -r dest replace default False action store_true help Replace your active hosts file with this new hosts file. N/A settings N/A options N/A vars N/A N/A parser parse_args N/A N/A options N/A outputpath N/A N/A N/A os path join BASEDIR_PATH N/A options N/A outputsubfolder N/A N/A options N/A freshen N/A N/A options N/A noupdate N/A settings N/A N/A N/A N/A settings update defaults N/A N/A N/A settings update options N/A N/A settings N/A sources N/A listdir_nohidden N/A settings N/A datapath N/A N/A settings N/A extensionsources N/A listdir_nohidden N/A settings N/A extensionspath N/A N/A settings N/A extensions N/A N/A N/A N/A os path basename item N/A item N/A listdir_nohidden N/A settings N/A extensionspath N/A N/A settings N/A extensions N/A sorted N/A list N/A N/A N/A set N/A options N/A extensions intersection N/A settings N/A extensions N/A N/A open N/A settings N/A readmedatafilename r f N/A N/A N/A settings N/A readmedata N/A N/A json load f N/A N/A promptForUpdate N/A N/A promptForExclusions N/A mergeFile N/A createInitialFile N/A N/A removeOldHostsFile N/A finalFile N/A removeDupsAndExcl mergeFile N/A N/A finalizeFile finalFile N/A N/A updateReadmeData N/A N/A printSuccess N/A N/A N/A N/A Success! The hosts file has been saved in folder  N/A settings N/A outputsubfolder 
It contains  N/A N/A {:,} format N/A settings N/A numberofrules  unique entries. N/A N/A promptForMove finalFile N/A promptForUpdate N/A N/A N/A N/A N/A N/A N/A N/A N/A os path isfile N/A N/A N/A os path join BASEDIR_PATH hosts N/A N/A N/A N/A N/A N/A N/A open N/A N/A N/A os path join BASEDIR_PATH hosts w+ close N/A N/A N/A N/A N/A printFailure ERROR: No 'hosts' file in the folder, try creating one manually N/A N/A N/A settings N/A freshen N/A N/A N/A response N/A N/A settings N/A auto yes N/A query_yes_no Do you want to update all data sources? N/A N/A response yes N/A N/A N/A updateAllSources N/A N/A N/A N/A settings N/A auto N/A N/A N/A print OK, we'll stick with what we've  got locally. N/A promptForExclusions N/A N/A N/A N/A N/A response N/A N/A settings N/A auto no N/A query_yes_no N/A N/A Do you want to exclude any domains?
 For example, hulu.com video streaming must be able to access  its tracking and ad servers in order to play video. N/A N/A response yes N/A N/A N/A displayExclusionOptions N/A N/A N/A N/A settings N/A auto N/A N/A N/A print OK, we'll only exclude domains in the whitelist. N/A promptForMoreCustomExclusions N/A N/A question N/A Do you have more domains you want to enter? N/A N/A N/A N/A query_yes_no question yes N/A promptForMove N/A N/A finalFile N/A N/A N/A N/A N/A settings N/A replace N/A N/A settings N/A skipstatichosts N/A N/A response yes N/A N/A response N/A N/A N/A settings N/A auto N/A settings N/A skipstatichosts no N/A query_yes_no N/A Do you want to replace your existing hosts file  with the newly generated file? N/A N/A response yes N/A N/A N/A moveHostsFileIntoPlace finalFile N/A N/A False N/A displayExclusionOptions N/A N/A N/A N/A N/A exclusionOption N/A settings N/A commonexclusions N/A N/A response N/A query_yes_no N/A N/A Do you want to exclude the domain  exclusionOption  ? N/A N/A response yes N/A N/A N/A excludeDomain exclusionOption N/A N/A N/A response N/A query_yes_no Do you want to exclude any other domains? N/A N/A response yes N/A N/A N/A gatherCustomExclusions N/A gatherCustomExclusions N/A N/A N/A N/A N/A True N/A N/A domainFromUser N/A myInput Enter the domain you want to exclude (e.g. facebook.com):  N/A N/A isValidDomainFormat domainFromUser N/A N/A N/A excludeDomain domainFromUser N/A N/A N/A promptForMoreCustomExclusions N/A N/A N/A excludeDomain N/A N/A domain N/A N/A N/A N/A N/A N/A settings N/A exclusionregexs append N/A N/A re compile N/A N/A settings N/A exclusionpattern domain N/A matchesExclusions N/A N/A strippedRule N/A N/A N/A strippedDomain N/A N/A N/A strippedRule split N/A 1 N/A exclusionRegex N/A settings N/A exclusionregexs N/A N/A N/A N/A exclusionRegex search strippedDomain N/A N/A True N/A False N/A updateAllSources N/A N/A N/A N/A N/A allsources N/A list N/A N/A set N/A settings N/A sources N/A set N/A settings N/A extensionsources N/A source allsources N/A N/A N/A N/A N/A os path isdir source N/A N/A updateURL N/A getUpdateURLsFromFile source N/A N/A N/A print N/A N/A N/A Updating source  N/A N/A N/A os path basename source  from  updateURL N/A updatedFile N/A getFileByUrl updateURL N/A N/A N/A updatedFile N/A N/A updatedFile replace N/A dataFile N/A open N/A N/A N/A os path join N/A settings N/A datapath source N/A settings N/A datafilenames wb N/A N/A writeData dataFile updatedFile N/A N/A N/A dataFile close N/A N/A N/A N/A N/A print Skipping. N/A getUpdateURLsFromFile N/A N/A source N/A N/A N/A pathToUpdateFile N/A N/A N/A os path join N/A settings N/A datapath source N/A settings N/A updateurlfilename N/A N/A N/A N/A os path exists pathToUpdateFile N/A N/A updateFile N/A open pathToUpdateFile r N/A retURLs N/A N/A updateFile readlines N/A N/A N/A updateFile close N/A N/A retURL None N/A N/A printFailure N/A N/A N/A N/A Warning: Can't find the update file for source  source Make sure that there's a file at  pathToUpdateFile N/A retURLs N/A getUpdateURLFromFile N/A N/A source N/A N/A N/A pathToUpdateFile N/A N/A N/A os path join N/A settings N/A datapath source N/A settings N/A updateurlfilename N/A N/A N/A N/A os path exists pathToUpdateFile N/A N/A N/A open pathToUpdateFile r updateFile N/A N/A N/A N/A N/A N/A updateFile readline strip N/A N/A printFailure N/A N/A N/A N/A Warning: Can't find the update file for source  source Make sure that there's a file at  pathToUpdateFile N/A None N/A createInitialFile N/A N/A N/A N/A N/A mergeFile N/A N/A tempfile NamedTemporaryFile N/A source N/A settings N/A sources N/A N/A filename N/A N/A N/A os path join N/A settings N/A datapath source N/A settings N/A datafilenames N/A N/A open filename r curFile N/A N/A N/A writeData mergeFile N/A N/A curFile read N/A source N/A settings N/A extensions N/A N/A filename N/A N/A N/A os path join N/A settings N/A extensionspath source N/A settings N/A datafilenames N/A N/A open filename r curFile N/A N/A N/A writeData mergeFile N/A N/A curFile read N/A mergeFile N/A removeDupsAndExcl N/A N/A mergeFile N/A N/A N/A numberOfRules N/A settings N/A numberofrules N/A N/A N/A N/A os path isfile N/A settings N/A whitelistfile N/A N/A N/A open N/A settings N/A whitelistfile r ins N/A N/A line ins N/A N/A line N/A N/A line strip N/A N/A line N/A N/A N/A line startswith # N/A N/A N/A N/A N/A settings N/A exclusions append line N/A N/A N/A N/A N/A os path exists N/A settings N/A outputpath N/A N/A N/A N/A os makedirs N/A settings N/A outputpath N/A finalFile N/A open N/A N/A N/A os path join N/A settings N/A outputpath hosts N/A Python3 w+b w+ N/A N/A N/A mergeFile seek 0 N/A hostnames N/A set N/A N/A N/A hostnames add localhost N/A N/A N/A hostnames add localhost.localdomain N/A N/A N/A hostnames add local N/A N/A N/A hostnames add broadcasthost N/A exclusions N/A settings N/A exclusions N/A line N/A N/A mergeFile readlines N/A N/A write true N/A line N/A N/A line decode UTF-8 N/A line N/A N/A line replace 	+ N/A line N/A N/A N/A line rstrip N/A N/A N/A N/A line N/A 0 # N/A N/A re match ^\s*$ N/A line N/A 0 N/A N/A N/A writeData finalFile line N/A N/A N/A ::1 line N/A N/A N/A strippedRule N/A stripRule line N/A N/A N/A strippedRule N/A matchesExclusions strippedRule N/A N/A N/A N/A hostname normalizedRule N/A normalizeRule strippedRule N/A exclude exclusions N/A N/A N/A exclude line N/A N/A write false N/A N/A N/A normalizedRule N/A hostname hostnames N/A write true N/A N/A N/A writeData finalFile normalizedRule N/A N/A N/A hostnames add hostname N/A numberOfRules 1 N/A N/A settings N/A numberofrules numberOfRules N/A N/A N/A mergeFile close N/A finalFile N/A normalizeRule N/A N/A rule N/A N/A N/A result N/A N/A re search ^[ \t]*(\d+\.\d+\.\d+\.\d+)\s+([\w\.-]+)(.*) rule N/A result N/A N/A N/A hostname suffix N/A N/A result group 2 3 N/A hostname N/A N/A N/A N/A hostname lower strip N/A suffix N/A N/A N/A hostname N/A %s %s #%s
 N/A N/A settings N/A targetip hostname suffix N/A N/A N/A hostname N/A %s %s
 N/A N/A settings N/A targetip hostname N/A N/A print N/A ==>%s<== rule N/A N/A None None N/A finalizeFile N/A N/A finalFile N/A N/A N/A N/A writeOpeningHeader finalFile N/A N/A N/A finalFile close N/A stripRule N/A N/A line N/A N/A N/A splitLine N/A N/A line split N/A N/A N/A len splitLine 2 N/A N/A N/A N/A N/A N/A N/A splitLine N/A 0 N/A splitLine N/A 1 N/A writeOpeningHeader N/A N/A finalFile N/A N/A N/A N/A N/A finalFile seek 0 N/A fileContents N/A N/A finalFile read N/A N/A N/A finalFile seek 0 N/A N/A writeData finalFile # This hosts file is a merged collection of hosts from reputable sources,
 N/A N/A writeData finalFile # with a dash of crowd sourcing via Github
#
 N/A N/A writeData finalFile N/A N/A # Date:  N/A N/A time strftime %B %d %Y N/A N/A time gmtime N/A N/A settings N/A extensions N/A N/A N/A writeData finalFile N/A N/A # Extensions added to this file:  N/A N/A ,  join N/A settings N/A extensions N/A N/A writeData finalFile N/A # Number of unique domains:  N/A N/A {:,}
#
 format N/A settings N/A numberofrules N/A N/A writeData finalFile N/A N/A # Fetch the latest version of this file: https://raw.githubusercontent.com/StevenBlack/hosts/master/ N/A N/A N/A os path join N/A settings N/A outputsubfolder hosts
 N/A N/A writeData finalFile # Project home page: https://github.com/StevenBlack/hosts
#
 N/A N/A writeData finalFile # ===============================================================
 N/A N/A writeData finalFile N/A N/A N/A settings N/A skipstatichosts N/A N/A N/A writeData finalFile 127.0.0.1 localhost
 N/A N/A writeData finalFile 127.0.0.1 localhost.localdomain
 N/A N/A writeData finalFile 127.0.0.1 local
 N/A N/A writeData finalFile 255.255.255.255 broadcasthost
 N/A N/A writeData finalFile ::1 localhost
 N/A N/A writeData finalFile fe80::1%lo0 localhost
 N/A N/A N/A N/A platform system Linux N/A N/A N/A writeData finalFile N/A N/A 127.0.1.1  N/A N/A socket gethostname N/A N/A writeData finalFile N/A preamble N/A N/A N/A os path join BASEDIR_PATH myhosts N/A N/A N/A N/A os path isfile preamble N/A N/A N/A open preamble r f N/A N/A N/A writeData finalFile N/A N/A f read N/A N/A N/A finalFile write fileContents N/A updateReadmeData N/A N/A N/A N/A N/A extensionsKey base N/A hostsLocation N/A N/A settings N/A extensions N/A N/A extensionsKey N/A N/A - join N/A settings N/A extensions N/A generationData N/A location entries N/A N/A N/A os path join N/A settings N/A outputsubfolder N/A settings N/A numberofrules N/A N/A N/A settings N/A readmedata N/A extensionsKey generationData N/A N/A open N/A settings N/A readmedatafilename w f N/A N/A N/A N/A json dump N/A settings N/A readmedata f N/A moveHostsFileIntoPlace N/A N/A finalFile N/A N/A N/A N/A N/A os name posix N/A N/A dnsCacheFound False N/A N/A print N/A Moving the file requires administrative privileges.  You might need to enter your password. N/A N/A N/A subprocess call N/A /usr/bin/sudo cp N/A N/A N/A os path abspath N/A finalFile name /etc/hosts N/A N/A N/A printFailure Moving the file failed. N/A N/A print Flushing the DNS Cache to utilize new hosts file... N/A N/A N/A N/A platform system Darwin N/A N/A dnsCacheFound True N/A N/A N/A subprocess call N/A /usr/bin/sudo killall -HUP mDNSResponder N/A N/A N/A printFailure Flushing the DNS Cache failed. N/A N/A N/A N/A N/A os path isfile /etc/rc.d/init.d/nscd N/A N/A dnsCacheFound True N/A N/A N/A subprocess call N/A /usr/bin/sudo /etc/rc.d/init.d/nscd restart N/A N/A N/A printFailure Flushing the DNS Cache failed. N/A N/A N/A printSuccess Flushing DNS by restarting nscd succeeded N/A N/A N/A N/A os path isfile /usr/lib/systemd/system/NetworkManager.service N/A N/A dnsCacheFound True N/A N/A N/A subprocess call N/A /usr/bin/sudo /usr/bin/systemctl restart NetworkManager.service N/A N/A N/A printFailure Flushing the DNS Cache failed. N/A N/A N/A printSuccess Flushing DNS by restarting NetworkManager succeeded N/A N/A N/A N/A os path isfile /usr/lib/systemd/system/wicd.service N/A N/A dnsCacheFound True N/A N/A N/A subprocess call N/A /usr/bin/sudo /usr/bin/systemctl restart wicd.service N/A N/A N/A printFailure Flushing the DNS Cache failed. N/A N/A N/A printSuccess Flushing DNS by restarting wicd succeeded N/A N/A N/A N/A os path isfile /usr/lib/systemd/system/dnsmasq.service N/A N/A dnsCacheFound True N/A N/A N/A subprocess call N/A /usr/bin/sudo /usr/bin/systemctl restart dnsmasq.service N/A N/A N/A printFailure Flushing the DNS Cache failed. N/A N/A N/A printSuccess Flushing DNS by restarting dnsmasq succeeded N/A N/A N/A N/A os path isfile /usr/lib/systemd/system/networking.service N/A N/A dnsCacheFound True N/A N/A N/A subprocess call N/A /usr/bin/sudo /usr/bin/systemctl restart networking.service N/A N/A N/A printFailure Flushing the DNS Cache failed. N/A N/A N/A printSuccess Flushing DNS by restarting networking.service succeeded N/A N/A dnsCacheFound N/A N/A N/A printFailure Unable to determine DNS management tool. N/A N/A N/A N/A os name nt N/A N/A N/A print Automatically moving the hosts file in place is not yet supported. N/A N/A print Please move the generated file to %SystemRoot%\system32\drivers\etc\hosts N/A removeOldHostsFile N/A N/A N/A N/A N/A oldFilePath N/A N/A N/A os path join BASEDIR_PATH hosts N/A N/A N/A N/A open oldFilePath a close N/A N/A settings N/A backup N/A N/A backupFilePath N/A N/A N/A os path join BASEDIR_PATH N/A N/A hosts-{} format N/A N/A time strftime %Y-%m-%d-%H-%M-%S N/A N/A N/A shutil copy oldFilePath backupFilePath N/A N/A N/A os remove oldFilePath N/A N/A N/A N/A open oldFilePath a close N/A query_yes_no N/A N/A question default N/A yes N/A N/A Ask a yes/no question via raw_input() and return their answer.

    "question" is a string that is presented to the user.
    "default" is the presumed answer if the user just hits <Enter>.
        It must be "yes" (the default), "no" or None (meaning
        an answer is required of the user).

    The "answer" return value is one of "yes" or "no".
     N/A valid N/A yes y ye no n yes yes yes no no N/A N/A default None N/A N/A prompt  [y/n]  N/A N/A N/A default yes N/A N/A prompt  [Y/n]  N/A N/A N/A default no N/A N/A prompt  [y/N]  N/A N/A N/A ValueError N/A invalid default answer: '%s' default N/A 1 N/A N/A N/A N/A N/A sys stdout write N/A N/A colorize question N/A colors PROMPT prompt N/A choice N/A N/A N/A myInput lower N/A N/A N/A default None N/A choice N/A N/A default N/A N/A N/A choice N/A N/A valid keys N/A N/A N/A valid N/A choice N/A N/A N/A printFailure Please respond with 'yes' or 'no' (or 'y' or 'n').
 N/A isValidDomainFormat N/A N/A domain N/A N/A N/A N/A domain N/A N/A N/A print You didn't enter a domain. Try again. N/A False N/A domainRegex N/A N/A re compile www\d{0,3}[.]|https? N/A N/A N/A domainRegex match domain N/A N/A N/A print N/A N/A N/A The domain  domain  is not valid.  Do not include www.domain.com or http(s)://domain.com. Try again. N/A False N/A N/A True N/A colors N/A N/A N/A PROMPT [94m N/A SUCCESS [92m N/A FAIL [91m N/A ENDC [0m N/A colorize N/A N/A text color N/A N/A N/A N/A N/A color text N/A colors ENDC N/A printSuccess N/A N/A text N/A N/A N/A N/A print N/A colorize text N/A colors SUCCESS N/A printFailure N/A N/A text N/A N/A N/A N/A print N/A colorize text N/A colors FAIL N/A N/A N/A __name__ __main__ N/A N/A N/A main