mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
Merge branch 'master' of ssh.github.com:mitmproxy/pathod
This commit is contained in:
commit
c4e6d7aea6
2
.gitignore
vendored
2
.gitignore
vendored
@ -10,4 +10,4 @@ MANIFEST
|
||||
.noseids
|
||||
netlib
|
||||
venv
|
||||
|
||||
.idea
|
@ -12,7 +12,7 @@ class SSLOptions:
|
||||
def __init__(self, certfile=None, keyfile=None, not_after_connect=None, request_client_cert=False):
|
||||
self.keyfile = keyfile or utils.data.path("resources/server.key")
|
||||
self.certfile = certfile or utils.data.path("resources/server.crt")
|
||||
self.cert = certutils.SSLCert.from_pem(file(self.certfile, "r").read())
|
||||
self.cert = certutils.SSLCert.from_pem(file(self.certfile, "rb").read())
|
||||
self.not_after_connect = not_after_connect
|
||||
self.request_client_cert = request_client_cert
|
||||
|
||||
|
6
pathod
6
pathod
@ -22,9 +22,9 @@ def daemonize (stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'):
|
||||
except OSError, e:
|
||||
sys.stderr.write ("fork #2 failed: (%d) %s\n" % (e.errno, e.strerror) )
|
||||
sys.exit(1)
|
||||
si = open(stdin, 'r')
|
||||
so = open(stdout, 'a+')
|
||||
se = open(stderr, 'a+', 0)
|
||||
si = open(stdin, 'rb')
|
||||
so = open(stdout, 'a+b')
|
||||
se = open(stderr, 'a+b', 0)
|
||||
os.dup2(si.fileno(), sys.stdin.fileno())
|
||||
os.dup2(so.fileno(), sys.stdout.fileno())
|
||||
os.dup2(se.fileno(), sys.stderr.fileno())
|
||||
|
Loading…
Reference in New Issue
Block a user