2019-07-23

-----本腳本不提供任何解釋,不懂請勿下載,謝謝--------------------------------

-----本腳本基于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

?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 228,505評論 6 533
  • 序言:濱河連續發生了三起死亡事件,死亡現場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機,發現死者居然都...
    沈念sama閱讀 98,556評論 3 418
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事?!?“怎么了?”我有些...
    開封第一講書人閱讀 176,463評論 0 376
  • 文/不壞的土叔 我叫張陵,是天一觀的道長。 經常有香客問我,道長,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 63,009評論 1 312
  • 正文 為了忘掉前任,我火速辦了婚禮,結果婚禮上,老公的妹妹穿的比我還像新娘。我一直安慰自己,他們只是感情好,可當我...
    茶點故事閱讀 71,778評論 6 410
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發上,一...
    開封第一講書人閱讀 55,218評論 1 324
  • 那天,我揣著相機與錄音,去河邊找鬼。 笑死,一個胖子當著我的面吹牛,可吹牛的內容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 43,281評論 3 441
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側響起,我...
    開封第一講書人閱讀 42,436評論 0 288
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后,有當地人在樹林里發現了一具尸體,經...
    沈念sama閱讀 48,969評論 1 335
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 40,795評論 3 354
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發現自己被綠了。 大學時的朋友給我發了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 42,993評論 1 369
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 38,537評論 5 359
  • 正文 年R本政府宣布,位于F島的核電站,受9級特大地震影響,放射性物質發生泄漏。R本人自食惡果不足惜,卻給世界環境...
    茶點故事閱讀 44,229評論 3 347
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 34,659評論 0 26
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至,卻和暖如春,著一層夾襖步出監牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 35,917評論 1 286
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人。 一個月前我還...
    沈念sama閱讀 51,687評論 3 392
  • 正文 我出身青樓,卻偏偏與公主長得像,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 47,990評論 2 374

推薦閱讀更多精彩內容

  • "use strict";function _classCallCheck(e,t){if(!(e instanc...
    久些閱讀 2,042評論 0 2
  • Lua 5.1 參考手冊 by Roberto Ierusalimschy, Luiz Henrique de F...
    蘇黎九歌閱讀 13,870評論 0 38
  • pyspark.sql模塊 模塊上下文 Spark SQL和DataFrames的重要類: pyspark.sql...
    mpro閱讀 9,480評論 0 13
  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,392評論 0 10
  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc閱讀 2,898評論 0 0