-----本脚本不提供任何解释,不懂请勿下载,谢谢--------------------------------
-----本脚本基于iphone5s、ios10系统制作----其他机型版本可能出现不能正常登录情况,请悉知。---
-----本脚本出于分享精神分享,请不要问我怎么修改成你需要的样子---------
-----喷子请自重!-----
-----欢迎朋友一起交流、微信yxxsoft QQ205539991------------------------------
require("TSLib")
local w,h = getScreenSize()
local wxid,wx = "",""
local Wx,Pas = "",""
_DebugSwitch = true
function _UI() ---UI初始化及设置
init(0,0)
UINew("微信62数据免费脚本by营销熊","启动","停止","uiconfig.dat",0,180)
--UIImage("http://www.baidu.com/img/bdlogo.png")
UIImage(userPath().."/res/yxx.png")
UILabel("请选择脚本功能",15,"left","0,0,0",-1,0)
UICombo("name","提取62数据,登录62数据")
UILabel("请选择改机软件",15,"left","0,0,0",-1,0)
UICombo("gaiji","NZT,AWZ")
UILabel("请选择提取数据",15,"left","0,0,0",-1,0)
UICombo("wx_id","提取wx_id,提取手机号")
UILabel("请先选择功能、读取的数据会存放在 res文件夹下面 读取62数据.txt,需要写入数据请把数据放在res文件夹下面 写入62数据.txt 编码采取UTF-8。本脚本为免费脚本,禁止任何人出售!",15,"left","0,0,0",-1,0)
UILabel("当前设备分辨率:"..w.."*"..h,15,"left","0,105,255",990,0)
UILabel("交流群:614860012",15,"left","125,125,100",-1,0)
UIShow()
end
function _启动应用(bid,sleep) --bid包名,sleep启动延迟时间
--bid为软件包名,sleep为启动延时时间
local sleep = sleep or 2000
local isfront = appIsRunning(bid)
if isfront == 0 then
toast("程序未运行正在启动中",1)
while runApp(bid) == 0 do
mSleep(sleep)
toast("启动成功",1)
return true
end
end
isfront = isFrontApp(bid)
if isfront == 0 then
toast("程序不在前台正在跳转中",1)
runApp(bid)
while isFrontApp(bid) == 0 do
runApp(bid)
mSleep(1000)
end
end
return true
end
function newfolder(path) --创建文件夹
return os.execute("mkdir "..path);
end
function _hexStringToFile(hex,file)
local data = '';
if hex==nil or string.len(hex)<2 then
toast('error',1)
return
end
hex = string.match(hex,"(%w+)");
for i = 1, string.len(hex),2 do
local code = string.sub(hex, i, i+1);
data =data..string.char(tonumber(code,16));
end
local file = io.open(file, 'wb');
file:write(data);
file:close();
end
function _writeData(data) --写入62
local wxdataPath = appDataPath('com.tencent.xin') .. '/Library/WechatPrivate/';
newfolder(wxdataPath)
os.execute('chown mobile ' .. wxdataPath)
_hexStringToFile(data,wxdataPath .. 'wx.dat')
os.execute('chown mobile ' .. wxdataPath .. 'wx.dat')
return true
end
function _文件查找读取写入(path,str,nr) --path路径,str要查找的文本,nr是新增文本,返回值是行内容和行数。
local path = userPath().."/res/"..path
local result
if isFileExist(path) then
else
dialog("路径不存在!请检查", time)
end
local 临时值
local data = readFileString(path)
data = TryRemoveUtf8BOM(data)
if data ~= "" and data ~= nil then
local line = strSplit(data,"\r\n")
for i = 1,#line do
if string.find(line[i],str) ~= nil then ---如果真 找到,需要继续找
--dialog(i.."="..line[i], time)
else
result = line[i]
临时值 = i
break
end
end
--dialog(临时值, time)
writeFileString(path,"","w")
for k = 1,#line do
if k == 临时值 then
writeFileString(path,line[k]..nr.."\r\n","a")
--writeFileString(path,"\n","a")
else
writeFileString(path,line[k].."\r\n","a")
end
end
end
return result,临时值
end
function _getData()
local file = io.open(appDataPath('com.tencent.xin') .. "/Library/WechatPrivate/wx.dat","rb")
if file then
local ts = require("ts")
local plist = ts.plist
local plfilename = "/var/mobile/Containers/Data/Application/"..Wildcard[var].."/Library/LocalInfo.lst" --设置plist路径
local tmp2 = plist.read(plfilename) --读取 PLIST 文件内容并返回一个 TABLE
for k, v in pairs(tmp2) do
if k == "$objects" then
for i = 3 ,5 do
if tonumber(v[i]) then
wx = v[i]
wxid = v[i-1]
break
end
end
end
end
nLog(Wildcard[var])
local str = file:read("*a")
file:close()
require"sz"
local str = string.tohex(str) --16进制编码
return str
end
end
function getData() ----旧版本获取数据
local getList = function(path)
local a = io.popen("ls "..path)
local f = {};
for l in a:lines() do
table.insert(f,l)
end
return f
end
local Wildcard = getList("/var/mobile/Containers/Data/Application")
for var = 1,#Wildcard do
local file = io.open("/var/mobile/Containers/Data/Application/"..Wildcard[var].."/Library/WechatPrivate/wx.dat","rb")
if file then
local ts = require("ts")
local plist = ts.plist
local plfilename = "/var/mobile/Containers/Data/Application/"..Wildcard[var].."/Library/LocalInfo.lst" --设置plist路径
local tmp2 = plist.read(plfilename) --读取 PLIST 文件内容并返回一个 TABLE
for k, v in pairs(tmp2) do
if k == "$objects" then
for i = 3 ,5 do
if tonumber(v[i]) then
wx = v[i]
wxid = v[i-1]
break
end
end
end
end
dialog(wxid.."\r\n"..wx, time)
nLog(Wildcard[var])
local str = file:read("*a")
file:close()
require"sz"
local str = string.tohex(str) --16进制编码
return str
end
end
end
function writeData(data) ---旧版本写入数据
local getList = function(path)
local a = io.popen("ls "..path)
local f = {};
for l in a:lines() do
table.insert(f,l)
end
return f
end
local Wildcard = getList("/var/mobile/Containers/Data/Application")
for var = 1,#Wildcard do
local file = io.open("/var/mobile/Containers/Data/Application/"..Wildcard[var].."/Library/WechatPrivate/wx.dat","wb")
if file then
require"sz"
data = string.fromhex(data)
os.execute('chown mobile '.."/var/mobile/Containers/Data/Application/"..Wildcard[var].."/Library/WechatPrivate/")
file:write(data)
file:close()
os.execute('chown mobile '.."/var/mobile/Containers/Data/Application/"..Wildcard[var].."/Library/WechatPrivate/wx.dat")
return true
end
end
end
function _追加写入(path,nr1,nr2,nr3,nr4,nr5,nr6,nr7) ---以追加的方式写入文本,path是路径,nr是要写入的内容,自动换行
local path = userPath().."/res/"..path
if nr1 == nil then
dialog("没有要存入的内容", time)
end
local nr2 = nr2 or ""
local nr3 = nr3 or ""
local nr4 = nr4 or ""
local nr5 = nr5 or ""
local nr6 = nr6 or ""
local nr7 = nr7 or ""
local 文件句柄 = io.open(path,"a")
local 文件 = 文件句柄:write(nr1,nr2,nr3,nr4,nr5,nr6,nr7)
local 文件 = 文件句柄:write("\n")
文件句柄:close()
local 文件句柄 = io.open(path,"r")
local 文件 = 文件句柄:read("*all")
toast(文件,5)
文件句柄:close()
end
function _nzt()
_启动应用("NZT",5000)
openURL("nzt://cmd/newrecord");
mSleep(3000)
end
function _awz()
_启动应用("AWZ")
openURL("IGG://cmd/newrecord");
mSleep(3000)
end
function _调试(showText)
if _DebugSwitch then
toast("调试:"..showText,1);
nLog("调试:"..showText)
mSleep(1500);
end
end
function ddzs(id,x1,y1) ---多点找色,坐标可省略,默认点击查找到的左上角,当坐标为0时,不执行点击动作。
local result
if id == "首页注册" then
x,y = findMultiColorInRegionFuzzy( 0xffffff, "-1|4|0x1aad19,-1|9|0xffffff,-1|13|0x1aad19,0|18|0xffffff,8|18|0x1aad19", 80,410, 1006, 547, 1095)
end
if id == "手机号登录" then
x,y = findMultiColorInRegionFuzzy( 0x000000, "5|6|0xf4f4f4,8|12|0x000000,8|19|0xf4f4f4,8|25|0x000000,8|32|0xf4f4f4,14|41|0x000000,30|-3|0x000000", 70, 22, 172,97, 297)
end
if id == "下一步" then
x,y = findMultiColorInRegionFuzzy( 0x1aad19, "6|4|0xffffff,2|7|0x1aad19,10|9|0x1aad19,9|17|0x1aad19,10|13|0xffffff,6|12|0xffffff", 80, 241, 551, 365, 726)
end
if id == "x" then
x,y = findMultiColorInRegionFuzzy( 0x000000, "-9|9|0x000000,-9|0|0xf3f3f3,-10|-10|0x000000,0|-12|0xf3f3f3,11|-11|0x000000,11|-1|0xf3f3f3,11|11|0x000000", 70, 10, 42, 95, 119)
end
if id == "<" then
x,y = findMultiColorInRegionFuzzy( 0x000000, "-12|13|0x000000,-20|5|0xf3f3f3,-18|19|0xf3f3f3,-4|22|0x000000,-12|13|0x000000,-6|13|0xf3f3f3,-18|13|0xf3f3f3", 70, 10, 42, 95, 119)
end
if id == "登录" then
x,y = findMultiColorInRegionFuzzy( 0x1aad19, "7|3|0xffffff,1|6|0x1aad19,10|8|0x1aad19,15|6|0xffffff,2|10|0xffffff,3|14|0x1aad19", 80, 254, 546, 380, 741)
end
if id == "微信号登录" then
x,y = findMultiColorInRegionFuzzy( 0x000000, "1|6|0xf4f4f4,2|14|0x000000,7|-1|0xf4f4f4,10|-1|0x000000,14|-1|0xf4f4f4,17|-1|0x000000,21|-1|0xf4f4f4,24|-1|0x000000", 85, 21, 165, 143, 310)
end
-----通用公共部分--------------------
local x1 = x1 or x --定义参数x1,如果传入了x1的值,那么x1 == x1,若没有传入x1值, x1 == x
local y1 = y1 or y --定义参数y1,如果传入了y1的值,那么y1 == y1,若没有传入y1值, y1 == y
if x1 == 0 or y1 == 0 then --首先判断传入的X1和x2是否等于0,如果等于0,执行下面的语句
if x~=-1 and y ~= -1 then --判断x和y的值,x和y是多点找色的坐标值,如果不等于-1,说明找到了。
result = true
_调试(id) --找到以后就把result的值赋值为 true
else
result = false --没有找到就把result的值赋值为 fasle
end
else ---如果传入的X1和x2等于0,执行下面的语句
if x~=-1 and y ~= -1 then --判断x和y的值,x和y是多点找色的坐标值,如果不等于-1,说明找到了。
tap(x1,y1) --找到坐标并执行点击命令
mSleep(1000)
_调试(id)
result = true --找到以后就把result的值赋值为 true
else
result = false --没有找到就把result的值赋值为 fasle
end
end
return result,x,y
end
function _loginwechat()
_启动应用("com.tencent.xin",5000)
while (true) do
if ddzs("首页注册",165, 1052) then
end
nLog(string.len(Wx))
nLog(string.sub(Wx,1,1))
nLog(Wx..Pas)
if string.len(Wx) == 11 and string.sub(Wx,1,1) == "1" then ----手机号登录
toast("手机号登录",1)
mSleep(1500)
if ddzs("手机号登录",0,0) and ddzs("x",0,0) then
tap( 494, 449)
mSleep(1000)
inputText(Wx)
mSleep(1000)
end
if ddzs("下一步") then
end
if ddzs("手机号登录",0,0) and ddzs("<",0,0) then
tap( 494, 449)
mSleep(1000)
inputText(Pas)
mSleep(1000)
end
if ddzs("登录") then
break
end
else
toast("微信号登录",1)
mSleep(1500)
if ddzs("手机号登录",0,0) and ddzs("x",0,0) then
tap(150, 545)
mSleep(1000)
end
if ddzs("微信号登录",0,0) then
tap(486, 363)
mSleep(1000)
inputText(Wx)
mSleep(1000)
tap(460, 401)
mSleep(1000)
inputText(Pas)
mSleep(1000)
end
if ddzs("登录") then
break
end
end
mSleep(200)
end
end
function TryRemoveUtf8BOM(ret)
if string.byte(ret,1)==239 and string.byte(ret,2)==187 and string.byte(ret,3)==191 then
ret=string.char( string.byte(ret,4,string.len(ret)) )
end
return ret;
end
function _写入62数据()
local path = userPath().."/res/写入62数据.txt"
local result
if isFileExist(path) then
else
dialog("写入文件不存在!请检查", time)
lua_exit()
end
local data = _文件查找读取写入("写入62数据.txt","已经读取","----已经读取")
data = TryRemoveUtf8BOM(data)
if data ~= "" and data ~= nil then
local data = strSplit(data,"----")
if #data > 2 then
Wx = data[1]
Pas = data[2]
end
_writeData(data[3])
toast("写入成功!")
result = true
else
dialog("登录失败!原因:写入62数据无效!", time)
result = false
end
return result
end
function _登录62流程()
if gaiji == "AWZ" then
_awz()
else
_nzt()
end
if _写入62数据() then
mSleep(1000)
_loginwechat()
else
dialog("登录失败!请检查数据!", time)
lua_exit()
end
end
function _提取62数据流程()
local data = _getData()
if data then
if wx_id == "提取wx_id" then
_追加写入("读取62数据.txt",wxid,"----",data)
dialog("提取成功!", time)
else
_追加写入("读取62数据.txt",wx,"----",data)
dialog("提取成功!", time)
end
else
dialog("提取失败!", time)
end
end
_UI()
if name == "登录62数据" then
_登录62流程()
end
if name == "提取62数据" then
_提取62数据流程()
end