Code Monkey home page Code Monkey logo

webvpn-dlut's Introduction

webvpn-dlut

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

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

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

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

加密方法:AES-128-CFB

代码结构

源代码为Python文件:“webvpn.py”

代码分为四个函数:

        getCiphertext(plaintext, key = key_, cfb_iv = iv_, size = 128) #利用明文生成密文
        getPlaintext(ciphertext, key = key_, cfb_iv = iv_, size = 128) #利用密文得到明文
        getVPNUrl(url)        #从普通的url转换成webvpn的url
        getOrdinaryUrl(url)   #从webvpn的url反推回普通的url

运行方式

如果缺少相关Python库,在命令行执行 pip install -r requirements.txt

并直接运行 python webvpn.py

可以得到一个知网论文网页的webvpn网址和一个webvpn网址对应的原先的网址。

适用性

理论上来说,可以应用到所有使用该系统的WebVPN上。在此提供一种移植的思路:

institution = 'webvpn.dlut.edu.cn'

改为

institution = 'webvpn.xxx.edu.cn'

即可切换为XXX的WebVPN。GL

webvpn-dlut's People

Contributors

eswzy avatar friparia avatar

Watchers

James Cloos avatar

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.