forked from M66B/XPrivacyLua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hook_19.json
1 lines (1 loc) · 1.68 KB
/
hook_19.json
1
{"builtin":false,"collection":"Privacy","group":"Use.Shell","name":"Runtime.exec\/array\/env\/file","author":"M66B","version":1,"description":"Log shell commands","className":"java.lang.Runtime","methodName":"exec","parameterTypes":["[Ljava.lang.String;","[Ljava.lang.String;","java.io.File"],"returnType":"java.lang.Process","minSdk":1,"maxSdk":999,"minApk":0,"maxApk":2147483647,"enabled":true,"optional":false,"usage":true,"notify":false,"luaScript":"-- This file is part of XPrivacyLua.\n\n-- XPrivacyLua is free software: you can redistribute it and\/or modify\n-- it under the terms of the GNU General Public License as published by\n-- the Free Software Foundation, either version 3 of the License, or\n-- (at your option) any later version.\n\n-- XPrivacyLua is distributed in the hope that it will be useful,\n-- but WITHOUT ANY WARRANTY; without even the implied warranty of\n-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n-- GNU General Public License for more details.\n\n-- You should have received a copy of the GNU General Public License\n-- along with XPrivacyLua. If not, see <http:\/\/www.gnu.org\/licenses\/>.\n\n-- Copyright 2017-2018 Marcel Bokhorst (M66B)\n\nfunction before(hook, param)\n local name = hook:getName()\n local command = param:getArgument(0)\n if command == nil then\n log('null')\n elseif type(command) == 'string' then\n log(command)\n else\n if name == 'ProcessBuilder.command\/list' then\n command = command:toArray()\n end\n\n local index\n local length = command['length']\n for index = 1, length do\n log(command[index])\n end\n end\n return false\nend"}