From 40895d91e5ab63018edf41bc2d10ca457b915451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Tue, 12 May 2015 20:10:34 +0200 Subject: [PATCH] Fix creation of new variables in the REPL Fixes frida/frida-gum#46. --- src/frida/repl.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/frida/repl.py b/src/frida/repl.py index df9f40e..1349f59 100644 --- a/src/frida/repl.py +++ b/src/frida/repl.py @@ -321,13 +321,12 @@ WARNING: Unable to find package 'gnureadline' needed for tab completion; user_script = f.read().rstrip("\r\n") + "\n\n// Frida REPL script:\n" return user_script + """\ -(function () { - "use strict"; +"use strict"; +(function () { function onEvaluate(expression) { try { - let result; - eval("result = " + expression + ";"); + let result = (1, eval)(expression); let sentBinary = false; if (result && result.hasOwnProperty('length')) {