From b92151b2e70f81f21f95f97db671f64f862c3e65 Mon Sep 17 00:00:00 2001 From: Rupert Edwards Date: Sun, 3 Jan 2016 21:36:53 -0500 Subject: [PATCH] Update toriptables2.py --- toriptables2.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/toriptables2.py b/toriptables2.py index 57b7dcd..cf4a671 100755 --- a/toriptables2.py +++ b/toriptables2.py @@ -41,6 +41,8 @@ DNSPort 53 @register def restart_tor(): + import sys + sys.tracebacklimit = 0 fnull = open(devnull, 'w') tor_restart = check_call(["service", "tor", "restart"], stdout=fnull, stderr=fnull) @@ -72,11 +74,14 @@ DNSPort 53 if __name__ == '__main__': parser = ArgumentParser( - description='Tor Iptables script for loading and unloading iptables rules') - parser.add_argument('-l', '--load', + description= + 'Tor Iptables script for loading and unloading iptables rules') + parser.add_argument('-l', + '--load', action='store_true', help='This option will load tor iptables rules') - parser.add_argument('-f', '--flush', + parser.add_argument('-f', + '--flush', action='store_true', help='This option flushes the iptables rules to default') args = parser.parse_args()