J
Jurian Sluiman
Hi all,
For my first script, I'm trying to build a program to set up a vpn
connection. I'm using pexpect to handle this, but I can't get it to work.
The sendline() is causing troubles. I tested it in the interactive promt,
with these results:
After this peace of code, I don't have a vpn connection. A "child.logfile
= sys.stdout" gave the information that after the spawn, vpnc was asking
for a password. I'm sure my password was correct, but my outside ip address
hasn't been changed (what should be with this connection) and there was no
vpnc process running.
What's going wrong?
Thanks in advance,
Jurian Sluiman
For my first script, I'm trying to build a program to set up a vpn
connection. I'm using pexpect to handle this, but I can't get it to work.
The sendline() is causing troubles. I tested it in the interactive promt,
with these results:
7import pexpect
child = pexpect.spawn("vpnc-connect tudelft\ nopass.conf")
child.expect(".* password .*: ") 0
child.sendline("[here_my_password]")
After this peace of code, I don't have a vpn connection. A "child.logfile
= sys.stdout" gave the information that after the spawn, vpnc was asking
for a password. I'm sure my password was correct, but my outside ip address
hasn't been changed (what should be with this connection) and there was no
vpnc process running.
What's going wrong?
Thanks in advance,
Jurian Sluiman