东南大学新的DrCOM网关认证系统只提供Web登陆,且Web页面是基于Javascript加载的(无法通过w3m之类的浏览器打开),因此无GUI的Linux服务器难以直接登陆。为此我分析了的该认证系统的登陆认证报文,写了一个小脚本,通过curl即可发送请求,实现Linux shell环境下登陆。

阅读全文 »

通过Python自带的socket包提取本机IP地址的代码,在Windows上正常,但在Linux上得到的是127.0.1.1。可以通过netifaces包等方法解决。

阅读全文 »

“These violent delights have violent ends
And in their triumph die, like fire and powder,
Which as they kiss consume: the sweetest honey
Is loathsome in his own deliciousness
And in the taste confounds the appetite:
Therefore love moderately; long love doth so;
Too swift arrives as tardy as too slow.”

- Shakespeare, Romeo and Juliet

阅读全文 »