Skip to content

Commit 4e8ff4d

Browse files
authored
Merge pull request #2 from kdssoftware/fix/luadecode
fix lua decoding to json wrong
2 parents ab28176 + 261d66b commit 4e8ff4d

4 files changed

Lines changed: 1 addition & 32 deletions

File tree

lua/lua-obfuscator/call.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
local M = {}
22
local json = require("lua-obfuscator.json")
3-
local utils = require("lua-obfuscator.utils")
43

54
-- TODO port to utils
65

@@ -65,11 +64,8 @@ M.newObfuscateRequest = function(sessionId)
6564
"-H 'Content-type: text/plain' -H 'apikey: test' -H 'sessionId: " ..
6665
sessionId .. "'"
6766

68-
local jsonData =
69-
'{CustomPlugins:{ControlFlowFlattenAllBlocks:[75],SwizzleLookups:[100],EncryptStrings:[100],RevertAllIfStatements:[50]},MinifiyAll:true,Virtualize:false}'
70-
7167
local command = string.format('curl -X POST %s -s %s --data-raw %q',
72-
endpoint, headers, json.decode(settingsData))
68+
endpoint, headers, json.encode(settingsData))
7369
local result = vim.fn.system(command)
7470

7571
if vim.v.shell_error ~= 0 then

lua/lua-obfuscator/options.lua

Whitespace-only changes.

lua/lua-obfuscator/ui.lua

Whitespace-only changes.

lua/lua-obfuscator/utils.lua

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)