From 78c55437e326cad8d8cbbe29f167be2a1afee970 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 24 Jan 2019 16:28:30 +0300 Subject: [PATCH] Add stack deobfuscation to dev server --- .idea/runConfigurations/build_teavm_fast.xml | 1 + .../javascript/rendering/Renderer.java | 2 + .../org/teavm/cli/TeaVMDevServerRunner.java | 5 + .../main/java/org/teavm/cli/TeaVMRunner.java | 10 ++ .../java/org/teavm/tooling/TeaVMTool.java | 7 +- .../teavm/tooling/builder/BuildStrategy.java | 2 + .../builder/InProcessBuildStrategy.java | 7 + .../tooling/builder/RemoteBuildStrategy.java | 7 +- .../org/teavm/tooling/daemon/BuildDaemon.java | 1 + .../tooling/daemon/RemoteBuildRequest.java | 1 + tools/devserver/pom.xml | 41 +++++ .../java/org/teavm/devserver/CodeServlet.java | 25 ++- .../java/org/teavm/devserver/DevServer.java | 6 + .../deobfuscate/DeobfuscateFunction.java | 24 +++ .../devserver/deobfuscate/Deobfuscator.java | 148 ++++++++++++++++++ .../deobfuscate/DeobfuscatorCallback.java | 24 +++ .../teavm/devserver/deobfuscate/Frame.java | 33 ++++ .../deobfuscate/Int8ArrayInputStream.java | 48 ++++++ .../org/teavm/devserver/indicator.js | 36 ++++- .../devserver/DevServerConfiguration.java | 1 + .../teavm/idea/devserver/DevServerRunner.java | 6 + .../TeaVMDevServerConfiguration.java | 11 ++ .../devserver/TeaVMDevServerRunState.java | 1 + .../ui/TeaVMDevServerSettingsPanel.java | 5 + .../org/teavm/maven/TeaVMCompileMojo.java | 4 + 25 files changed, 450 insertions(+), 6 deletions(-) create mode 100644 tools/devserver/src/main/java/org/teavm/devserver/deobfuscate/DeobfuscateFunction.java create mode 100644 tools/devserver/src/main/java/org/teavm/devserver/deobfuscate/Deobfuscator.java create mode 100644 tools/devserver/src/main/java/org/teavm/devserver/deobfuscate/DeobfuscatorCallback.java create mode 100644 tools/devserver/src/main/java/org/teavm/devserver/deobfuscate/Frame.java create mode 100644 tools/devserver/src/main/java/org/teavm/devserver/deobfuscate/Int8ArrayInputStream.java diff --git a/.idea/runConfigurations/build_teavm_fast.xml b/.idea/runConfigurations/build_teavm_fast.xml index f18528139..bae310f9b 100644 --- a/.idea/runConfigurations/build_teavm_fast.xml +++ b/.idea/runConfigurations/build_teavm_fast.xml @@ -10,6 +10,7 @@