LUA提取免费迅雷账号
--获取http://www.521xunlei.com/ 免费迅雷账号 function getPageid()
local http = require("socket.http")
local url = "http://521xunlei.com/forum.php?mod=forumdisplay&fid=2&orderby=dateline"
local resp = http.request(url)
local s = string.find(resp, "<tbody id=\"normalthread_")
local e = string.find(resp, "\">", s)
local pageid = string.sub(resp, s + 24, e - 1)
return pageid
end function getDatas()
local urlpre = "http://521xunlei.com/thread-"
local url = urlpre .. getPageid() .. "-1-1.html"
local http = require("socket.http")
local html = http.request(url)
local i = 1
local usrstart, usrend, psdstart, psdend, temp_x, temp_y
while(string.find(html, "爱密码迅雷会员共享", i))
do
i, j = string.find(html, "爱密码迅雷会员共享", i)
usrstart = j + 1
usrend, temp_x = string.find(html, "独家分享密码", j)
psdstart = temp_x + 1
usrend = usrend - 1
temp_y, _ = string.find(html, "</font>", temp_x)
psdend = temp_y - 1
print("用户名:" .. string.sub(html, usrstart, usrend) .. " 密码:" .. string.sub(html, psdstart, psdend))
i = psdend
end
end print(getDatas()) --[[
按照发帖时间将帖子排序
http://521xunlei.com/forum.php?mod=forumdisplay&fid=2&orderby=dateline
最新帖子查找example:
<tbody id="normalthread_8901">
]]
--匹配的字符串有问题了,导致获取不到
参考一篇博文:http://blog.csdn.net/zhangxaochen/article/details/8084396
http://blog.csdn.net/ruiyiin/article/details/25953155
. 任意字符
%s 空白符
%p 标点
%c 控制字符
%d 数字
%x 十六进制数
%z 代表0的字符
%a 字母
%l 小写字母
%u 大写字母
%w 字母数字
字符类的大写形式代表相应集合的补集, 比如 %A 表示除了字母以外的字符集
另外,* + - 三个,作为通配符分别表示:
*: 匹配前面指定的 0 或多个同类字符, 尽可能匹配更长的符合条件的字串
+: 匹配前面指定的 1 或多个同类字符, 尽可能匹配更长的符合条件的字串
-: 匹配前面指定的 0 或多个同类字符, 尽可能匹配更短的符合条件的字串 于是, "(%a+)%s*=%s*(%a+)" 表示, 先匹配一个或多个字母, 然后是零个或多个空白符(比如空格), 然后是个 '=', 然后空白符, 然后字母。这样, 满足匹配的只有 "name = Anna"。 所以输出位置为 2 12.
因为捕获了两个 (%a+), 也就是 name, Anna 这两个单词, 所以还输出了这两个单词
代码更改为:
--获取http://www.521xunlei.com/ 免费迅雷账号 function getPageid()
local http = require("socket.http")
local url = "http://521xunlei.com/forum.php?mod=forumdisplay&fid=2&orderby=dateline"
local resp = http.request(url)
local s = string.find(resp, "<tbody id=\"normalthread_")
local e = string.find(resp, "\">", s)
local pageid = string.sub(resp, s + 24, e - 1)
return pageid
end function getDatas()
local urlpre = "http://521xunlei.com/thread-"
local url = urlpre .. getPageid() .. "-1-1.html"
local http = require("socket.http")
local html = http.request(url)
local title_x, title_y
_, title_x = string.find(html, "<span id=\"thread_subject\">");
title_y, _ = string.find(html, "</span>", title_x)
print("\t" .. string.sub(html, title_x + 1, title_y - 1) .. "\n") local html_x = string.find(html, "<td class=\"t_f\"")
local html_y = string.find(html, "</td>", html_x)
html = string.sub(html, html_x, html_y) --[[
<td class="t_f" id="postmessage_170571">...</td>
]] local i,usrstart, usrend, psdstart, psdend
i = 1
while(string.find(html, "迅雷", i))
do
i, _ = string.find(html, "迅雷", i)
usrstart, usrend = string.find(html, ("(%w+):%d"), i)
if(usrstart == nil or usrend == nil) then
break
end
psdstart, psdend = string.find(html, "%d%d%d%d%d%d%d", usrend)
if(psdstart == nil or psdend == nil) then
break
end
i = psdend + 1
print("账号:" .. string.sub(html, usrstart, usrend) .. "\t密码:" .. string.sub(html, psdstart, psdend))
end
end print(getDatas())
os.execute("pause") --[[
按照发帖时间将帖子排序
http://521xunlei.com/forum.php?mod=forumdisplay&fid=2&orderby=dateline
最新帖子查找example:
<tbody id="normalthread_8901">
]]
测试:
因为获取到的迅雷账号,不一定保证有效,所以要写一个批量登陆验证的脚本。(待续...)
方法:
1、获取窗口句柄
2、sendmessage实现
LUA提取免费迅雷账号的更多相关文章
- swift语言注册非免费苹果账号iOS游戏框架Sprite Kit基础教程
swift语言注册非免费苹果账号iOS游戏框架Sprite Kit基础教程 1.2.3 注册非免费苹果账号swift语言注册非免费苹果账号iOS游戏框架Sprite Kit基础教程 免费的苹果账号在 ...
- 免费苹果账号(apple id)申请ios证书p12真机调试
HBuilder可以直接打包越狱版的ipa包,但需要越狱手机才能安装,如果需要安装到没越狱的手机安装,需要自己申请ios证书打包. 一般是需要一个付费了的苹果开发者账号才能申请ios证书打包. 这里介 ...
- 免费ss账号网站
下面网址按排序顺序优先使用,数字越小优先级越高 1,https://io.freess.today/ 2,https://free-ss.site/ 3,https://ss.freess.org/ ...
- 免费s账号网站
下面网址按排序顺序优先使用,数字越小优先级越高 1,https://io.freess.today/ 2,https://free-ss.site/ 3,https://ss.freess.org/ ...
- 微信公众号开发第六课 BAE结合实现迅雷账号随机分享
迅雷离线是个好东西,那么我们能不能实现这样一个功能,回复迅雷,随机返回一个迅雷账户和密码. 首先在t_type类型表中添加 迅雷以及对应用值xunlei,这样返回的case值中对应值xunlei. 建 ...
- codeforge免费下载账号 积分账号 共享账号
codeforge网站下载代码很好,没有积分怎么办?那么多好的matlab代码,matlab程序,C,JAVA等等,都要充值啊!!! 请用下面共享的codeforge账号密码========> ...
- pudn免费下载账号 codeforge积分账号 pudn共享账号 codeforge下载账号
www.pudn.com和www.codeforge.cn网站下载代码很好,没有积分怎么办?那么多好的matlab代码,matlab程序,C,JAVA等等,都要充值啊!!! 下面的账号积分都用完了,大 ...
- 速成KeePass全局自动填表登录QQ与迅雷(包括中文输入法状态时用中文用户名一键登录)
原文:http://bbs.kafan.cn/thread-1637531-1-1.html 使用目的:1 网页和本地客户端登录一站式解决2 通过KeePss修改密码和登录更方便,可以复制粘贴,省了输 ...
- NeuChar 平台使用及开发教程(二):设置平台账号
在上一篇<NeuChar 平台使用及开发教程(一):开始使用 NeuChar>中我们了解了 NeuChar 的角色和大体功能框架,并进行了注册,本文将介绍如何设置多账号,以便让 NeuCh ...
随机推荐
- 我终于懂得如何使用matplotlib进行画图
一 前言 本篇文章带大家快速入门如何使用matplotlib画出精美数学的图片:看完本篇文章你将获得熟悉并简单使用matplotlib工具,会画基本得折现图,散点图,sin,cos图,一张画布画出多图 ...
- 【C++】几个简单课本例题
// // main.cpp // 2_1 // // Created by T.P on 2018/2/28. // Copyright © 2018年 T.P. All rights reserv ...
- Jenkins+ant+jmeter环境搭建
下载的工具版本: apache-jmeter-3.0 apache-ant-1.8.4 jenkins-2.46.3 之前用jmeter写了测试接口的脚本,运行及返回结果都正常,所以需要做的就是工具的 ...
- AVR单片机教程——ADC
ADC 计算机的世界是0和1的.单片机可以通过读取0和1来确定按键状态,也可以输出0和1来控制LED.即使是看起来不太0和1的PWM,好像可以输出0到5V之间的电压一样,达到0和1之间的效果,但本质上 ...
- Fabric1.4:Go 链码开发与编写
1 链码结构 1.1 链码接口 链码启动必须通过调用 shim 包中的 Start 函数,传递一个类型为 Chaincode 的参数,该参数是一个接口类型,有两个重要的函数 Init 与 Invoke ...
- 【Springboot】注解@ConfigurationProperties让配置整齐而简单
1 简介 前面我们用一篇文章<[Spring]只想用一篇文章记录@Value的使用,不想再找其它了(附思维导图)> 详细讲解了在Spring中如何使用@Value来实现我们对配置的需求,它 ...
- 通过例子学习C++(三)最大公约数,并知其然
本文是通过例子学习C++的第三篇,通过这个例子可以快速入门c++相关的语法. 题目要求:输入两个整数,求其大公约数. 解答方法一:两个数的最大公约数,是这两个数中的小数,或者是这2个数的公约数中的最大 ...
- ubuntu下报错Sub-process /usr/bin/dpkg returned an error code (1)的解决方法
cd /var/lib/dpkg sudo mv info info.bak #即备份一个info sudo mkdir info #新建一个新的info目录 然后采用以下命令重装那些出错的软件包 s ...
- HTTPS中的TLS
1. SSL 与 TLS SSL:(Secure Socket Layer) 安全套接层,于 1994 年由网景公司设计,并于 1995 年发布了 3.0 版本TLS:(Transport Layer ...
- python中方法调用和函数调用的区别
函数调用: 传几个参数,就会有几个实参方法调用: 默认传递一个参数self,至少要定义一个形参