Python免费SSH帐号获取器源码,pythonssh帐号源码,Python免费SSH帐


Python免费SSH帐号获取器有什么好处?因为网络限制,想要第一时间获取新的Pyhton教程时就需要‘翻墙’,那翻墙时我们要选择相对稳定的方法比较妥帖。

我们今天要说的是应用SSH来达到效果。相对比起TOR翻墙效果,我更喜欢SSH的,它拥有非常稳定的带宽与快速的登录,可以独立翻墙,而不必担心会被封哦。那如何用python来获取免费SSH帐号呢?来看下面一段python代码。

获取免费SSH帐号python方法需要用到的模块库有:urllib、re正则

Python免费的SSH帐号获取器源码:

import urllibimport reurl="http://feelssh.com/"#url中的网址有时会遇到打不开的情况哦!html=urllib.urlopen(url)result=html.read().decode('utf-8')#f=file('ssh.txt','w')#f.write(result.encode('utf-8'))#f.close()#www.iplaypy.compattern='([^\x00-\xff]{6}\d+.\d+.\d+.\d+)<'server=re.findall(pattern,result)pattern='(SSH[^\x00-\xff]{3}\d{2})<'port=re.findall(pattern,result)pattern='(SSH[^\x00-\xff]{3}[A-Za-z]+)<'account=re.findall(pattern,result)pattern='>\n\n\s(\S{9})\n<'psw=re.findall(pattern,result)for i in range(len(server)):        print '\t%s'%server[i],'\n\t%s'%port[i],'\n\t%s'%account[i],'\n\t%s'%'密码:'+str(psw[i]),'\n\n'

编橙之家文章,

评论关闭