Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Add Comment
Please, Sign In to add comment