-----本腳本不提供任何解釋,不懂請勿下載,謝謝--------------------------------
-----本腳本基于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