Code Monkey home page Code Monkey logo

webvpn-dlut's Introduction

webvpn-dlut

webvpn.dlut.edu.cn是 DUT 的 WebVPN,提供了从校外访问校园网环境资源的接口,可供访问校内资源。

但是登录后,由于链接为加密状态,仅能访问该系统门户所提供的站点。

正巧最近的课程涉及到该链接编制方式,用 Python 实现加密链接与普通链接的转换方式。

经查,该系统为网瑞达科技的资源访问控制系统(WebVPN),并使用了Wxzxvpn2023key@$(原为wrdvpnisthebest!)作为 key 和 iv。

加密方法:AES-128-CFB

部署

安装依赖库:

pip install -r requirements.txt

使用

通过--encode(可简写为-e)参数将普通网址转换为通过 WebVPN 访问的网址:

python webvpn.py --encode <url>

通过--decode(可简写为-d)参数将通过 WebVPN 访问的网址转换为普通网址:

python webvpn.py --decode <url>

可选参数:

  • --key:指定加解密的 key。
  • --iv:指定加解密的 iv。
  • --institution(可简写为-i):指定 WebVPN 系统的域名(仅encode模式生效,默认即webvpn.dlut.edu.cn)。

代码结构

源代码为 Python 文件:webvpn.py

代码分为四个函数:

getCiphertext(plaintext, key, cfb_iv, size = 128)       # 利用明文生成密文
getPlaintext(ciphertext, key, cfb_iv, size = 128)       # 利用密文得到明文
getVPNUrl(url)          # 将普通网址转换为通过 WebVPN 访问的网址
getOrdinaryUrl(url)     # 将通过 WebVPN 访问的网址转换为普通网址

参见

webvpn4dut:JavaScript「实现」的 WebVPN 链接转换。

dlut-survival-tools:与大连理工大学相关的工具收集。

webvpn-dlut's People

Contributors

0eac avatar eswzy avatar friparia avatar imagebuilder1837 avatar lixiangwuxian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

webvpn-dlut's Issues

URL 包含端口时的解决方案

URL 本身带端口号时,转换后的 WebVPN 链接的协议部分追加一个「-」和端口号。如:

127.0.0.1:8080 -> https://webvpn.xxxx.edu.cn/http-8080/77726476706e69737468656265737421a1a516d2777e381e2f

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.