mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-02-01 11:09:18 +01:00
parent
65e81d51c6
commit
7a9e36d211
@ -211,9 +211,9 @@ class Method(BaseMethod):
|
|||||||
+ '\n'
|
+ '\n'
|
||||||
|
|
||||||
pf_status = pfctl('-s all')[0]
|
pf_status = pfctl('-s all')[0]
|
||||||
if '\nrdr-anchor "sshuttle" all\n' not in pf_status:
|
if b'\nrdr-anchor "sshuttle" all\n' not in pf_status:
|
||||||
pf_add_anchor_rule(PF_RDR, "sshuttle")
|
pf_add_anchor_rule(PF_RDR, "sshuttle")
|
||||||
if '\nanchor "sshuttle" all\n' not in pf_status:
|
if b'\nanchor "sshuttle" all\n' not in pf_status:
|
||||||
pf_add_anchor_rule(PF_PASS, "sshuttle")
|
pf_add_anchor_rule(PF_PASS, "sshuttle")
|
||||||
|
|
||||||
pfctl('-a sshuttle -f /dev/stdin', rules)
|
pfctl('-a sshuttle -f /dev/stdin', rules)
|
||||||
@ -221,7 +221,7 @@ class Method(BaseMethod):
|
|||||||
o = pfctl('-E')
|
o = pfctl('-E')
|
||||||
_pf_context['Xtoken'] = \
|
_pf_context['Xtoken'] = \
|
||||||
re.search(r'Token : (.+)', o[1]).group(1)
|
re.search(r'Token : (.+)', o[1]).group(1)
|
||||||
elif 'INFO:\nStatus: Disabled' in pf_status:
|
elif b'INFO:\nStatus: Disabled' in pf_status:
|
||||||
pfctl('-e')
|
pfctl('-e')
|
||||||
_pf_context['started_by_sshuttle'] = True
|
_pf_context['started_by_sshuttle'] = True
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user