summaryrefslogtreecommitdiffstats
path: root/Sshuttle VPN.app/Contents/Resources/sshuttle/ssh.py
diff options
context:
space:
mode:
authorAvery Pennarun <apenwarr@gmail.com>2011-02-01 03:57:29 -0800
committerAvery Pennarun <apenwarr@gmail.com>2011-02-01 03:57:29 -0800
commit76359bc71ce4d850cb5778026dd359a0ee3cb6f8 (patch)
tree925e20ad3c2a1b3e3218f24032ac7dd953a062da /Sshuttle VPN.app/Contents/Resources/sshuttle/ssh.py
parent34ea1ed8b7ec3188af378100dc43616e8d304856 (diff)
MacOS precompiled app package for sshuttle-0.50a-2-ga238f76
Diffstat (limited to 'Sshuttle VPN.app/Contents/Resources/sshuttle/ssh.py')
-rw-r--r--Sshuttle VPN.app/Contents/Resources/sshuttle/ssh.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/Sshuttle VPN.app/Contents/Resources/sshuttle/ssh.py b/Sshuttle VPN.app/Contents/Resources/sshuttle/ssh.py
index ac7f411..9a6270a 100644
--- a/Sshuttle VPN.app/Contents/Resources/sshuttle/ssh.py
+++ b/Sshuttle VPN.app/Contents/Resources/sshuttle/ssh.py
@@ -14,14 +14,16 @@ def readfile(name):
raise Exception("can't find file %r in any of %r" % (name, path))
-def empackage(z, filename):
+def empackage(z, filename, data=None):
(path,basename) = os.path.split(filename)
- content = z.compress(readfile(filename))
+ if not data:
+ data = readfile(filename)
+ content = z.compress(data)
content += z.flush(zlib.Z_SYNC_FLUSH)
- return '%s\n%d\n%s' % (basename,len(content), content)
+ return '%s\n%d\n%s' % (basename, len(content), content)
-def connect(ssh_cmd, rhostport, python, stderr):
+def connect(ssh_cmd, rhostport, python, stderr, options):
main_exe = sys.argv[0]
portl = []
@@ -52,7 +54,9 @@ def connect(ssh_cmd, rhostport, python, stderr):
z = zlib.compressobj(1)
content = readfile('assembler.py')
- content2 = (empackage(z, 'helpers.py') +
+ optdata = ''.join("%s=%r\n" % (k,v) for (k,v) in options.items())
+ content2 = (empackage(z, 'cmdline_options.py', optdata) +
+ empackage(z, 'helpers.py') +
empackage(z, 'compat/ssubprocess.py') +
empackage(z, 'ssnet.py') +
empackage(z, 'hostwatch.py') +