From 29d2e06bf5cd3d575015e23c638ca9e5a10ee29c Mon Sep 17 00:00:00 2001 From: Tianyi Cui Date: Tue, 19 Apr 2011 20:19:06 +0800 Subject: Added --exclude-from feature. (Slightly modified by apenwarr) --- main.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main.py') diff --git a/main.py b/main.py index daf3b87..34d9fb1 100755 --- a/main.py +++ b/main.py @@ -57,6 +57,7 @@ dns capture local DNS requests and forward to the remote DNS server python= path to python interpreter on the remote server r,remote= ssh hostname (and optional username) of remote sshuttle server x,exclude= exclude this subnet (can be used more than once) +exclude-from= exclude the subnets in a file (whitespace separated) v,verbose increase debug message verbosity e,ssh-cmd= the command to use to connect to the remote [ssh] seed-hosts= with -H, use these hostnames for initial scan (comma-separated) @@ -104,6 +105,8 @@ try: for k,v in flags: if k in ('-x','--exclude'): excludes.append(v) + if k in ('-X', '--exclude-from'): + excludes += open(v).read().split() remotename = opt.remote if remotename == '' or remotename == '-': remotename = None -- cgit v1.2.3