Skip to content

Commit 7a9e36d

Browse files
committed
Fix MacOSX/Python3.5 issues.
Closes: apenwarr#36.
1 parent 65e81d5 commit 7a9e36d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sshuttle/methods/pf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,17 +211,17 @@ def setup_firewall(self, port, dnsport, nslist, family, subnets, udp):
211211
+ '\n'
212212

213213
pf_status = pfctl('-s all')[0]
214-
if '\nrdr-anchor "sshuttle" all\n' not in pf_status:
214+
if b'\nrdr-anchor "sshuttle" all\n' not in pf_status:
215215
pf_add_anchor_rule(PF_RDR, "sshuttle")
216-
if '\nanchor "sshuttle" all\n' not in pf_status:
216+
if b'\nanchor "sshuttle" all\n' not in pf_status:
217217
pf_add_anchor_rule(PF_PASS, "sshuttle")
218218

219219
pfctl('-a sshuttle -f /dev/stdin', rules)
220220
if sys.platform == "darwin":
221221
o = pfctl('-E')
222222
_pf_context['Xtoken'] = \
223223
re.search(r'Token : (.+)', o[1]).group(1)
224-
elif 'INFO:\nStatus: Disabled' in pf_status:
224+
elif b'INFO:\nStatus: Disabled' in pf_status:
225225
pfctl('-e')
226226
_pf_context['started_by_sshuttle'] = True
227227
else:

0 commit comments

Comments
 (0)