domingo, 14 de abril de 2013

Automatic CheckPoint SSL VPN login (Linux)

Little recipe to automatically login to CheckPoint SSL Network Extender:

----------------- /home/user/login.vpn.expect -----------
#!/usr/bin/expect
spawn /usr/bin/snx -s <SERVER> -p 443 -u <USERNAME>
expect "password:"
send "<PASSWORD>\r"
expect eof
----------------------------------

To execute it, you just need to use expect tool:
-----------
$ expect login.vpn.expect

Good luck!