|
发表于 2017-9-2 18:24:10
|
显示全部楼层
广东省广州市
这是触动精灵Iphone版的62获取和写入代码,仅供参考
触动精灵62数据.lua
- 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 str = file:read("*a")
- file:close()
- --[[
- require"sz"
- local str = string.tohex(str) --16进制编码
- ]]
- return str
- end
- end
- end
- function writeData(data) --写入数据(62数据)
- 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","w+")
- if file then
- file:write(data)
- file:close()
- return true
- end
- end
- end
复制代码 |
评分
-
查看全部评分
|