MCPcopy Index your code
hub / github.com/sshuttle/sshuttle / pfctl

Function pfctl

sshuttle/methods/pf.py:387–402  ·  view source on GitHub ↗
(args, stdin=None)

Source from the content-addressed store, hash-verified

385
386
387def pfctl(args, stdin=None):
388 argv = ['pfctl'] + shlex.split(args)
389 debug1('>> %s' % ' '.join(argv))
390 p = ssubprocess.Popen(argv, stdin=ssubprocess.PIPE,
391 stdout=ssubprocess.PIPE,
392 stderr=ssubprocess.PIPE,
393 env=get_env())
394 o = p.communicate(stdin)
395 if p.returncode:
396 log('%r returned %d, stdout and stderr follows: ' %
397 (argv, p.returncode))
398 log("stdout:\n%s" % o[0].decode("ascii"))
399 log("stderr:\n%s" % o[1].decode("ascii"))
400 raise Fatal('%r returned %d' % (argv, p.returncode))
401
402 return o
403
404
405def pf_get_dev():

Callers 10

enableMethod · 0.70
disableMethod · 0.70
add_anchorsMethod · 0.70
add_rulesMethod · 0.70
has_skip_loopbackMethod · 0.70
add_anchorsMethod · 0.70
add_anchorsMethod · 0.70
enableMethod · 0.70
disableMethod · 0.70
add_anchorsMethod · 0.70

Calls 4

debug1Function · 0.90
get_envFunction · 0.90
logFunction · 0.90
FatalClass · 0.90

Tested by

no test coverage detected