Fix creation of new variables in the REPL

Fixes frida/frida-gum#46.
This commit is contained in:
Ole André Vadla Ravnås
2015-05-12 20:10:34 +02:00
parent 703fddd9d5
commit 40895d91e5
+3 -4
View File
@@ -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')) {