Updated toriptables2.py Refactor
This commit is contained in:
parent
b33068443a
commit
4d25fbe118
1 changed files with 3 additions and 5 deletions
|
@ -46,12 +46,10 @@ DNSPort %s
|
||||||
def restart_tor():
|
def restart_tor():
|
||||||
fnull = open(devnull, 'w')
|
fnull = open(devnull, 'w')
|
||||||
try:
|
try:
|
||||||
tor_restart = check_call(
|
tor_restart = check_call(["service", "tor", "restart"],
|
||||||
["service", "tor", "restart"],
|
stdout=fnull, stderr=fnull)
|
||||||
stdout=fnull, stderr=fnull)
|
|
||||||
if tor_restart is 0:
|
if tor_restart is 0:
|
||||||
print(" {0}".format(
|
print(" {0}".format("[\033[92m+\033[0m] Anonymizer \033[92mON\033[0m"))
|
||||||
"[\033[92m+\033[0m] Anonymizer \033[92mON\033[0m"))
|
|
||||||
except CalledProcessError as err:
|
except CalledProcessError as err:
|
||||||
print("\n[!] Command failed: %s" % err.cmd)
|
print("\n[!] Command failed: %s" % err.cmd)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue