From 9412e5b9198fed887d075d45273c0d3ca222ba9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Fri, 10 May 2019 21:27:47 +0200 Subject: [PATCH] Remove redundant 'use strict' directives --- examples/bytecode.py | 2 -- examples/child_gating.py | 3 +-- examples/rpc.py | 2 -- tests/test_rpc.py | 8 -------- 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/examples/bytecode.py b/examples/bytecode.py index 794e318..30712ed 100644 --- a/examples/bytecode.py +++ b/examples/bytecode.py @@ -6,8 +6,6 @@ import frida system_session = frida.attach(0) bytecode = system_session.compile_script(name="bytecode-example", source="""\ -'use strict'; - rpc.exports = { listThreads: function () { return Process.enumerateThreadsSync(); diff --git a/examples/child_gating.py b/examples/child_gating.py index fabcebe..e5d6d4a 100644 --- a/examples/child_gating.py +++ b/examples/child_gating.py @@ -44,8 +44,7 @@ class Application(object): print("✔ enable_child_gating()") session.enable_child_gating() print("✔ create_script()") - script = session.create_script("""'use strict'; - + script = session.create_script("""\ Interceptor.attach(Module.findExportByName(null, 'open'), { onEnter: function (args) { send({ diff --git a/examples/rpc.py b/examples/rpc.py index ffd4f88..fc031b5 100644 --- a/examples/rpc.py +++ b/examples/rpc.py @@ -6,8 +6,6 @@ import frida session = frida.attach("Twitter") script = session.create_script("""\ -'use strict'; - rpc.exports = { hello: function () { return 'Hello'; diff --git a/tests/test_rpc.py b/tests/test_rpc.py index e1286f9..f1dadb2 100644 --- a/tests/test_rpc.py +++ b/tests/test_rpc.py @@ -33,8 +33,6 @@ class TestRpc(unittest.TestCase): def test_basics(self): script = self.session.create_script(name="test-rpc", source="""\ -"use strict"; - rpc.exports = { add: function (a, b) { var result = a + b; @@ -60,8 +58,6 @@ rpc.exports = { def test_post_failure(self): script = self.session.create_script(name="test-rpc", source="""\ -"use strict"; - rpc.exports = { init: function () { }, @@ -76,8 +72,6 @@ rpc.exports = { def test_unload_mid_request(self): script = self.session.create_script(name="test-rpc", source="""\ -"use strict"; - rpc.exports = { waitForever: function () { return new Promise(function () {}); @@ -97,8 +91,6 @@ rpc.exports = { def test_detach_mid_request(self): script = self.session.create_script(name="test-rpc", source="""\ -"use strict"; - rpc.exports = { waitForever: function () { return new Promise(function () {});