For Python AnyConnect, is a small python wrapper on Cisco's AnyConnect
command-line VPN interface.
This wrapper was created because the provided command line binary has limited automation functionality making it hard to script in a fault tolerant way.
The branch openconnect
contains a rough adaptation of Panyc to work with the
OpenConnect client.
Its main features are:
Panyc requirements are included in the requirements.txt
file.
To install in a virtualenv use:
pip install -r requirements.txt
The script can be used by feeding a configuration file via stdin:
cat tests/data/default.config | ./panyc.py connect -
or by providing a passwordstore identifier:
./panyc.py connect vpn/myvpn
You can add a skeleton config to passwordstore (aka pass) by running:
cat tests/data/default.config | pass insert -m vpn/myvpn
For more information about pass check the password-store website.
To start a new connection run:
./panyc.py connect vpn/myvpn
to disconnect:
./panyc.py disconnect
to check the status of the connection:
./panyc.py status
to obtain the version of the VPN client:
./panyc.py --version
for anything else:
./panyc.py --help