1. 我就是那个很不起眼的Feather
1.1. 关于自己
Mail: [email protected]
BLOG: http://blog.sina.com.cn/u/1145264221
BLOG: http://andelf.spaces.msn.com
1.2. 陕西广电登陆程序(供Linux,FreeBSD使用)
现在有个情况就是不知道 'l_PwPUE~IBo<' 'k@?6SYhabQA4' 是如何加密的,如果有谁能帮下忙....不胜感激. yula00499 => 'l_PwPUE~IBo<'
1 from urllib import thishost,urlopen
2 from time import time
3 myip = thishost()
4 myname = 'l_PwPUE~IBo<'
5 mypass = 'k@?6SYhabQA4'
6 def login(ip,username,password):
7 logurl = r'http://172.31.1.21/ClientProcess.jsp?MsgType=0&LocalIP='+\
ip+r'&username='+username+r'&password='+password
8 f = urlopen(logurl).read()
9 for i in f.split('&'):
10 if i.startswith('loginKey'):
11 a = i.replace('loginKey=','')
12 elif i.startswith('username='):
13 b = i.replace('username=','')
14 if a and b:
15 return (a, b)
16 else: raise RuntimeError
17 def logout(ip,cname,logkey):
18 outurl = r'http://172.31.1.21/ClientProcess.jsp?MsgType=3&ISNNO=1021&LocalIP='+\
ip+r'&UserName='+cname+r'&LoginKey='+logkey+'&isPNP=0&httpIP='+ip
19 f = urlopen(outurl).read()
20 if f.find('ipconfig=0')!= -1:
21 return True
22 else: return False
23 print '*********Network Client For SXBCTV*********'
24 print 'Program By Feather ([email protected])'
25 print 'Now login to the server....'
26 try:
27 p = login(myip, myname, mypass)
28 except:
29 print 'Login Error, Check Connection Please!'
30 if p:
31 start = time()
32 key = p[0]
33 cname = p[1]
34 print 'You are Login As %s ,The Key is %s' % (cname, key)
35 else :
36 print 'Login Error, Check Connection Please!'
37 while True:
38 cmd = raw_input("Type 'exit' While You Want To Disconnect: \n>>>")
39 if cmd in ['exit', 'bye', 'quit', 'logoff', 'disconnect']:
40 if logout(myip, cname, key):
41 end = time()
42 print 'Time Lasted(s):', end-start
43 print "You've Disconnected from the Server!!"
44 raise SystemExit
45 else:
46 print 'Error occured......'
47 raise SystemExit
1.3. 最近正在