Jump to content

NIKITAOFF

Members
  • Content Count

    8
  • Donations

    $0.00 
  • Joined

  • Last visited

Community Reputation

1 n00b

About NIKITAOFF

  • Rank
    Newbie

Additional Information

  • Android
    6.x (Marshmallow)
  • Device
    Xiaomi Redmi Note 3 Pro

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I want a logger (hook) that write the function with name like: --name in script *fuction* ...
  2. I want to save to file the text that I entered in gg.prompt function main() m = gg.choice({ "Write", "Exit" },nil,"test") if m == nil then else if m == 1 then write() end if m == 2 then exit() end end farm = -1 end function write() local writename = "/sdcard/Download/log.txt" local write write = io.open(writename,"w") write:write(gg.prompt( {'test'}, {[1]='write here'}, {[1]='text'} )) if crashw == nil then gg.alert("You did not enter anything") main() end gg.setVisible(true) print('Yeah!!!') os.exit() end function exit() os.exit() end while true do if gg.isVisible(true) then farm = 1 gg.setVisible(false) end if farm == 1 then main() end end
  3. NIKITAOFF

    Write in file

    Hello! How to write text to file via gg.prompt? Can anyone help? Please
  4. if gg.isVisible(true) then gg.setVisible(false) end ::Mainmenu:: gg.clearResults() menu = gg.choice({'Weak Encryption','High Encryption','Log Script Functions','Exit'},nil,'Menu') if menu == 1 then point1(Chikri) end if menu == 2 then point2(Chikri) end if menu == 3 then point3(Chikri) end if menu == 4 then exit(Chikri) end if menu == nil then os.exit() end function exit(Chikri) os.exit() end function point1(Chikri) local last = gg.getFile() info = gg.prompt({'Select script file:'}, {last}, {'file'}) if info == nil then os.exit() end last = info[1] local test = loadfile(info[1]) if test == nil then gg.alert('Failed load script: '..info[1]) else local sel = gg.choice({'Weak Encryption', 'Strong Encryption', 'Dump source'}) if sel == nil then os.exit() end if sel == 1 or sel == 2 then local warn = gg.alert('Scripts in binary form may not work on other versions of GameGuardian', 'Agree', 'Disagree') if warn ~= 1 then os.exit() end local out = last..".bin.lua" local file = io.open(out, "w") file:write(string.dump(test, sel == 2)) file:close() gg.alert('The binary script is saved to the file:\n'..out) end function point2(Chikri) local last = gg.getFile() info = gg.prompt({'Select Script To Encrypt:'}, {last}, {'file'}) if info == nil then os.exit() end last = info[1] local enc = gg.prompt({'Set Password'},{[1]=0},{[1]='number'}) function Ecrypt(Text) return Text:gsub('.', function (c) return string.format ("%02X", (string.byte(c) + 13 + enc[1]) % 256) end):gsub(" ", "+") end local out = last..".chikrienc.ua" local file = io.open(last, 'r'); assert(file); local data = file:read('*a'); file:close(); gg.alert('The encrypted script is saved to the file:\n'..out) c = Ecrypt(data) d = [==[ --Encryptor Made By Chikri print('Script Encryptor Made By Chikri') function encodes(key,code) return (code:gsub('..', function (h) return string.char((tonumber(h,16)+256-13 - key + 999999*256)%256) end)) end local v_value=gg.prompt({'Enter password:'},{[1]=0},{[1]='number'}) gg.toast('Loading……') pcall(encodes(v_value[1],'technano')) local data = encodes(v_value[1],'technano') local enc = load(data) pcall(enc) ]==] d = string.gsub(d,'technano',c) file = io.open(out,'w')file:write(d)file:close() end function point3(Chikri) local ggg = {} for k, v in pairs(gg) do ggg[k] = v end local sel = select local typ = type local str = tostring local echo = print local io_open = io.open local tr = {} local msg = '' if true then local load_cnt = 0 local fname = g.last..'.load_' for i, v in pairs({load=1, loadfile=0, dofile=0}) do local orig = _G local hook = 1 local type = v hook = function (...) local arg = {...} local content = arg[1] if type == 0 then content = nil local f = io_open(arg[1], "rb") if f ~= nil then content = f:read("*a") f:close() end end if content ~= nil then local ret = nil local total = 0 local file = fname..load_cnt..'.lua' local f = io_open(file, 'w') if type == 1 and typ(content) == 'function' then local func = function (...) local ret = content(...) if ret ~= nil then f:write(ret) total = total + #ret else f:close() end return ret end ret = orig(func, sel(2, ...)) else f:write(content) total = #content f:close() ret = orig(...) end echo('Hooked load '..load_cnt..' with size of '..total..' bytes saved into '..file) load_cnt = load_cnt + 1 return ret end return orig(...) end tr[hook] = orig _G = hook end msg = msg..'\n\nAll data from calls "load" will be dumped into files: '..g.last..'.load_*.lua' end if true then local file = g.last..'.log' local f = io_open(file, 'w') f:write("-- Hook started\n") f:close() local names = { setRanges = {'^REGION_'}, startFuzzy = {'^TYPE_', '0x%X', '0x%X'}, searchAddress = {nil, '0x%X', '^TYPE_', '^SIGN_[^F]', '0x%X', '0x%X'}, searchFuzzy = {nil, '^SIGN_FUZZY_', '^TYPE_', '0x%X', '0x%X'}, searchNumber = {nil, '^TYPE_', nil, '^SIGN_[^F]', '0x%X', '0x%X'}, loadList = {nil, '^LOAD_'}, saveList = {nil, '^SAVE_'}, editAll = {nil, '^TYPE_'}, copyMemory = {'0x%X', '0x%X'}, dumpMemory = {'0x%X', '0x%X'}, } local rets = { alert = 1, prompt = 1, choice = 1, multiChoice = 1, } local toFlags = function (check, value) local ret = '' for k, v in pairs(ggg) do if k:match(check) ~= nil and (value & v) == v then if ret ~= '' then ret = ret..' | ' end ret = ret..'gg.'..k value = value & ~v end end if ret == '' or value ~= 0 then if ret ~= '' then ret = ret..' | ' end ret = ret..value end return ret end for i, v in pairs(ggg) do if typ(v) == 'function' and i ~= 'getFile' and i ~= 'getLine' and i ~= 'isVisible' then local orig = v local name = i local hook = 1 hook = function (...) local arg = {...} local f = io_open(file, 'a') f:write('gg.'..name..'(') for j, a in ipairs(arg) do if j ~= 1 then f:write(', ') end if typ(a) == 'string' then f:write('"') end local b = a if typ(a) == 'number' and names[name] ~= nil and names[name][j] ~= nil then local check = names[name][j] if check:sub(1, 1) ~= '^' then if a == 0 or a == -1 then b = a else b = check:format(a) end else b = toFlags(check, a) end end b = str(b) f:write(b) if typ(a) == 'string' then f:write('"') end end f:write(")") if rets[name] ~= nil then local ret = orig(...) f:write(" --[[ ") f:write(str(ret)) f:write(" ]]\n") f:close() return ret end f:write("\n") f:close() return orig(...) end tr[hook] = orig gg = hook end end msg = msg..'\n\nAll GG calls will be logged into file: '..g.last..'.log' end echo('Hook started.'..msg..'\n') ggg.alert('Hook started. Run script, input passwords and so on.'..msg) msg = nil if true then local orig = string.dump local hook = 1 hook = function (...) local arg = {...} if tr[arg[1]] ~= nil then --echo('string.dump:', tr[arg[1]], arg[1]) arg[1] = tr[arg[1]] end return orig(arg[1], sel(2, ...)) end tr[hook] = orig string.dump = hook end if true then local orig = tostring local hook = 1 hook = function (...) local old = tostring local arg = {...} if tr[arg[1]] ~= nil then --tostring = orig; echo('tostring:', tr[arg[1]], arg[1]) arg[1] = tr[arg[1]] end local ret = orig(arg[1], sel(2, ...)) tostring = old return ret end tr[hook] = orig tostring = hook end if true then local orig = debug.getupvalue local hook = 1 hook = function (...) local arg = {...} if tr[arg[1]] ~= nil then --echo('debug.getupvalue:', tr[arg[1]], arg[1], arg[2]) arg[1] = tr[arg[1]] end return orig(arg[1], sel(2, ...)) end tr[hook] = orig debug.getupvalue = hook end if false then local orig = os.remove local hook = 1 hook = function (...) local arg = {...} echo('os.remove:', arg) return true end tr[hook] = orig os.remove = hook end if false then local orig = assert local hook = 1 hook = function (...) local arg = {...} echo('assert:', arg) return orig(...) end tr[hook] = orig assert = hook end if false then local orig = io.open local hook = 1 hook = function (...) local arg = {...} echo('io.open:', arg) return orig(...) end tr[hook] = orig io.open = hook end end local test = g.test g = nil test() end end
  5. Can anyone help me? I have a script on github
  6. Who can help? function game() NIK = gg.multiChoise({ "Wallhack SD 625+", "Body Acid", "Antena", "Back"}, nil,"lool") if NIK == nil then else if NIK[1] == true then wh() end if NIK[2] == true then acid() end if NIK[3] == true then antena() end if NIK[4] == true then HOME() end end test=-1 end Script error: org.luaj.vm2.LuaError: @/sdcard/LUA/test script.lua:27 `NIK = gg.multiChoise({` attempt to call nil level = 1, pc = 11 stack traceback: /sdcard/LUA/test script.lua:85 in function 'game' /sdcard/LUA/test script.lua:67 in function 'HOME' /sdcard/LUA/test script.lua:164 in main chunk [Java]: in ? at org.luaj.vm2.LuaValue.checkmetatag(LuaValue.java:2888) at org.luaj.vm2.LuaValue.callmt(LuaValue.java:2043) at org.luaj.vm2.LuaValue.call(LuaValue.java:1558) at org.luaj.vm2.LuaClosure.execute(LuaClosure.java:431) at org.luaj.vm2.LuaClosure.call(LuaClosure.java:140) at org.luaj.vm2.LuaClosure.execute(LuaClosure.java:424) at org.luaj.vm2.LuaClosure.call(LuaClosure.java:140) at org.luaj.vm2.LuaClosure.execute(LuaClosure.java:424) at org.luaj.vm2.LuaClosure.call(LuaClosure.java:140) at android.ext.Script.runScript(Script.java:4523) at android.ext.Script$ScriptThread.run(Script.java:4323)
×
×
  • Create New...