ssh 账号获取

[代码] [Python]代码

view source print ?
01 # -*- coding: cp936 -*-
02 import urllib
03 import re
04 url="http://feelssh.com/"
05 html=urllib.urlopen(url)
06 result=html.read().decode('utf-8')
07  
08 #f=file('ssh.txt','w')
09 #f.write(result.encode('utf-8'))
10 #f.close()
11  
12 pattern='([^\x00-\xff]{6}\d+.\d+.\d+.\d+)<'
13 server=re.findall(pattern,result)
14 pattern='(SSH[^\x00-\xff]{3}\d{2})<'
15 port=re.findall(pattern,result)
16 pattern='(SSH[^\x00-\xff]{3}[A-Za-z]+)<'
17 account=re.findall(pattern,result)
18 pattern='>\n\n\s(\S{9})\n<'
19 psw=re.findall(pattern,result)
20  
21 for i in range(len(server)):
22

        print '\t%s'%server[i],'\n\t%s'%port[i],'\n\t%s'%account[i],'\n\t%s'%'密码:'+str(psw[i]),'\n\n'

http://shop67566103.taobao.com/

你可能感兴趣的:(ssh,Google,Facebook,Youtube)