unode / panyc

Command-line interface to Cisco's AnyConnect VPN.
GNU General Public License v3.0
11 stars 4 forks source link

Panyc

For Python AnyConnect, is a small python wrapper on Cisco's AnyConnect command-line VPN interface. Build Status

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:

Config example

See one config used for tests

Installation

Panyc requirements are included in the requirements.txt file.

To install in a virtualenv use:

pip install -r requirements.txt

Usage

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.

Connecting

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