├── web.png ├── crypto3.png ├── crypto4.png ├── crypto.py ├── README.md └── LICENSE /web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w43322/neu-webvpn-anysite/HEAD/web.png -------------------------------------------------------------------------------- /crypto3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w43322/neu-webvpn-anysite/HEAD/crypto3.png -------------------------------------------------------------------------------- /crypto4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/w43322/neu-webvpn-anysite/HEAD/crypto4.png -------------------------------------------------------------------------------- /crypto.py: -------------------------------------------------------------------------------- 1 | from Crypto.Cipher import AES 2 | 3 | url = 'neucsecg.neu.edu.cn' 4 | 5 | cipher = AES.new( 6 | 'b0A58a69394ce73@', 7 | AES.MODE_CFB, 8 | 'b0A58a69394ce73@', 9 | segment_size=128) 10 | cipher_text = cipher.encrypt(url.ljust(len(url)//16*16+16, '\0').encode()) 11 | 12 | res = 'https://webvpn.neu.edu.cn/http/62304135386136393339346365373340' \ 13 | + cipher_text[:len(url)].hex() 14 | print(res) 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 在校外通过WebVPN访问东北大学校园网任何网页的方法 2 | 3 | ## why 4 | 1. 学校给的SSL VPN服务很不稳定,而且需要安装客户端/浏览器插件。 5 | 2. 学校提供的WebVPN服务所能选择的网页很少,cg平台和oj等常用网页都没有提供。 6 | ## how 7 | ### 原理 8 | 1. 通过分析WebVPN的链接发现,都是以`https://webvpn.neu.edu.cn/http/62304135386136393339346365373340`开头。 9 | 2. 这个链接后面的内容实际上是通过AES-128加密的域名,再加上url后半段。 10 | 11 | ## 在哪用? 12 | ### web端 13 | [点我](http://hazuki.ren/webvpn) 14 | 15 | ![](./web.png) 16 | 17 | ### 客户端 18 | 1. 安装pycrypto:`pip3 install pycrypto` 19 | 2. 将下面脚本中的`url`改为你想要访问的域名。 20 | ```python 21 | from Crypto.Cipher import AES 22 | 23 | url = 'neucsecg.neu.edu.cn' 24 | 25 | cipher = AES.new( 26 | 'b0A58a69394ce73@', 27 | AES.MODE_CFB, 28 | 'b0A58a69394ce73@', 29 | segment_size=128) 30 | cipher_text = cipher.encrypt(url.ljust(len(url)//16*16+16, '\0').encode()) 31 | 32 | res = 'https://webvpn.neu.edu.cn/http/62304135386136393339346365373340' \ 33 | + cipher_text[:len(url)].hex() 34 | print(res) 35 | ``` 36 | 3. 运行脚本,输出的链接即为转换后的链接 37 | ![](./crypto3.png) 38 | 4. 用浏览器打开链接,enjoy 39 | ![](./crypto4.png) 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 w43322 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | --------------------------------------------------------------------------------