Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
/ Cisco-AutoConnect Public archive
forked from awangga/outlook

Launch Cisco Anyconnect with Outlook Email Authentication by One-Click. Support HKU 2FA. -- 一键启动 Cisco Anyconnect,完成 Outlook 邮箱验证。支持 HKU 2FA。

Notifications You must be signed in to change notification settings

lanelam/Cisco-AutoConnect

 
 

Repository files navigation

Cisco-AutoConnect

Tired of entering password and 2FA authencation token in Cisco Anyconnect?

Try Cisco-AutoConnect! Launch App, Enter password, Fill in authencation token - All at One Click.

Statement: This project is initiated as a utility to The University of Hong Kong (HKU) 2FA VPN Service (Cisco Anyconnect), so it might performes poorly on other cases. Please modify to your case if not working.

<简体中文说明>

Supporting

Email Service:

  • Outlook

Device:

  • Windows
  • MacOS(developing)

How to use?

0. Make sure you have login history in your device

This step is to ensure you have saved your VPN setting and account in your Cisco Anyconnect App.

A future version will potentially support this initialization.

1. Install dependencies

Clone this project to your device.

You can use following code to create and activate a virtual env:

cd < your project directory >
python -m venv venv
venv\Scripts\activate

After activation, download prerequisites:

python -m pip install -r requirements.txt

2. Configure environment

Open config.ini, and write in following parameters:

  • AppDirt: Cisco Anyconnect UI directory.

    For Windows, defaults to C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe

  • AppUsername(disabled): Cisco Anyconnect user name. For this version, it is disabled now, so you can ignore this.

  • AppPassword: Cisco Anyconnect user password.

  • EmailAccount: Outlook email account.

  • EmailPassword: Outlook email password.

  • FolderName: Outlook email folder that will receive authencation email.

  • SenderEmailAccount: Outlook email account that will send you authencation email.

3. (Windows) Open AutoConnect_win.bat

Double click AutoConnect_win.bat to launch Cisco-AutoConnect. If service is working, log will be printed in Console. Else, error will be raised.

Please wait for the service launching until it automately quit Console.

To stablize it, please avoid clicking elsewhere while launching service. If failed, you can retry by reopening AutoConnect_win.bat.


Cisco-AutoConnect 简体中文说明

厌倦了在Cisco Anyconnect中输入密码和2FA身份验证令牌吗?

试试Cisco-AutoConnect!启动应用程序,输入密码,填写身份验证令牌 - 一键完成。

声明:该项目最初是作为香港大学(HKU)2FA VPN服务(Cisco Anyconnect)的实用工具发起,因此在其他场景下可能表现较差。如果无法使用,请根据你的情况进行修改。

支持

邮件服务:

  • Outlook

设备:

  • Windows
  • MacOS(开发中)

如何使用?

0. 确保你的设备中有登录历史记录

这一步是为了确保你在Cisco Anyconnect应用中保存了VPN设置和账户。

未来的版本可能会支持此初始化过程。

1. 安装依赖项

将该项目克隆到你的设备上。 你可以使用以下代码创建并激活一个虚拟环境:

cd <你的项目目录>
python -m venv venv
venv\Scripts\activate

激活后,下载所需的依赖项:

python -m pip install -r requirements.txt

2. 配置环境

打开 config.ini 文件,并填写以下参数:

  • AppDirt:Cisco Anyconnect UI 目录。

    对于Windows,默认为_C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe

  • AppUsername(已禁用):Cisco Anyconnect 用户名。对于此版本,现在已禁用,所以你可以忽略这个参数。

  • AppPassword:Cisco Anyconnect 用户密码。

  • EmailAccount:Outlook 电子邮件账户。

  • EmailPassword:Outlook 电子邮件密码。

  • FolderName:用于接收身份验证邮件的 Outlook 电子邮件文件夹。

  • SenderEmailAccount:向你发送身份验证邮件的 Outlook 电子邮件账户。

3.(Windows)打开_AutoConnect_win.bat_

双击 AutoConnect_win.bat 启动 Cisco-AutoConnect。如果服务正常运行,将在控制台中打印日志。否则,将会打印错误信息。

请等待服务启动,直到它自动退出控制台。

为了稳定运行,请在启动服务时避免点击其他地方。如果失败,可以重新打开 AutoConnect_win.bat 重试。

About

Launch Cisco Anyconnect with Outlook Email Authentication by One-Click. Support HKU 2FA. -- 一键启动 Cisco Anyconnect,完成 Outlook 邮箱验证。支持 HKU 2FA。

Topics

Resources

Stars

Watchers

Forks

Languages

  • Python 99.4%
  • Batchfile 0.6%