北工大网关的命令行登录
今天在内网装了个 Linux 机器,CentOS 6.8,没装图形界面,也没有命令行浏览器。因为校园网是需要在 web 页面登录网关后才能访问外网,但连不上外网就不能用 yum 装浏览器。
所以如果不用麻烦的本地安装,这就是一个先有鸡先有蛋的死循环。
然而。
我们使用 curl 直接模拟登录的 post 请求就好咯。
1 | curl -d "DDDDD=UserName&upass=Password&v46s=1&0MKKey=" "http://lgn.bjut.edu.cn/" |
返回的页面标题是“登陆成功窗”就 OK 啦。
All articles in this blog are licensed under CC BY-SA 4.0 unless stating additionally.
Comment