# Path: viper/openvpn/management.py
# class OVPNInterface:
# class OVPNPollThread(threading.Thread):
#     def __init__(self, cb_last_gateway = None, cb_set_ovpn_status = None):
#     def send(self, command, connection_timeout = .5, response_delay = .5):
#     def hangup(self):
#     def terminate(self):
#     def poll_status(self, last_known_gateway = None):
#     def parse_state_response(self, msg):
#     def parse_realtime_msg(self, line):
#     def __init__(self):
#     def set_last_known_gateway(self, gw):
#     def shutdown(self):
#     def run(self):
# 
# Path: viper/openvpn/launcher.py
# class VPNLauncherException(Exception):
# class OpenVPNNotFoundException(VPNLauncherException):
# class OpenVPNLauncher:
#     def __init__(self):
#     def launch(self, cfgfile, logfile):
#     def terminate(self):
# 
# Path: viper/tools.py
# PRODUCT_NAME = "Viper"
# PRODUCER_NAME = "Greenhost"
# DEFAULT_OPENVPN_HOME = "./openvpn/"
# DEFAULT_VIPER_HOME = "./"
# WINREG_KEY_NAME = r'Software\Viper'
# def save_last_config(tunname, tunconfig, tunlogdir, tunpolicy):
# def load_last_config():
# def is_viper_running():
# def run_unique(fn):
# def is_openvpn_running():
# def log_init_app(lvl=logging.DEBUG):
# def log_init_service(level=logging.DEBUG, logfile="c:\ovpnmon.log"):
# def get_viper_home():
# def get_openvpn_home():
# def get_my_cwd():
# def get_user_cwd():
# def get_resource_path(res):
# def flush_dns():
# def log(msg):
# def windows_has_tap_device():
# def sanitize_ip(ipaddr):
# def save_default_gateway():
# def recover_default_gateway():
# def delete_default_gateway():
# def restore_default_gateway():


import os, sys, re, time
import logging
import viper
from pprint import pprint
from viper.openvpn import management, launcher
from viper import tools
#!/usr/bin/env python




def main():
	logging.basicConfig(level=logging.DEBUG)
	man = management.OVPNInterface()
	while True:
		status = man.poll_status()
		pprint(status)
		time.sleep(0.2)



# Path: viper/openvpn/management.py
# class OVPNInterface:
# class OVPNPollThread(threading.Thread):
#     def __init__(self, cb_last_gateway = None, cb_set_ovpn_status = None):
#     def send(self, command, connection_timeout = .5, response_delay = .5):
#     def hangup(self):
#     def terminate(self):
#     def poll_status(self, last_known_gateway = None):
#     def parse_state_response(self, msg):
#     def parse_realtime_msg(self, line):
#     def __init__(self):
#     def set_last_known_gateway(self, gw):
#     def shutdown(self):
#     def run(self):
# 
# Path: viper/openvpn/launcher.py
# class VPNLauncherException(Exception):
# class OpenVPNNotFoundException(VPNLauncherException):
# class OpenVPNLauncher:
#     def __init__(self):
#     def launch(self, cfgfile, logfile):
#     def terminate(self):
# 
# Path: viper/tools.py
# PRODUCT_NAME = "Viper"
# PRODUCER_NAME = "Greenhost"
# DEFAULT_OPENVPN_HOME = "./openvpn/"
# DEFAULT_VIPER_HOME = "./"
# WINREG_KEY_NAME = r'Software\Viper'
# def save_last_config(tunname, tunconfig, tunlogdir, tunpolicy):
# def load_last_config():
# def is_viper_running():
# def run_unique(fn):
# def is_openvpn_running():
# def log_init_app(lvl=logging.DEBUG):
# def log_init_service(level=logging.DEBUG, logfile="c:\ovpnmon.log"):
# def get_viper_home():
# def get_openvpn_home():
# def get_my_cwd():
# def get_user_cwd():
# def get_resource_path(res):
# def flush_dns():
# def log(msg):
# def windows_has_tap_device():
# def sanitize_ip(ipaddr):
# def save_default_gateway():
# def recover_default_gateway():
# def delete_default_gateway():
# def restore_default_gateway():


# Path: montest.py
import os, sys, re, time
import logging
import viper
from pprint import pprint
from viper.openvpn import management, launcher
from viper import tools

#!/usr/bin/env python




def main():
	logging.basicConfig(level=logging.DEBUG)
	man = management.OVPNInterface()
	while True:
		status = man.poll_status()
		pprint(status)
		time.sleep(0.2)



if __name__ == '__main__':