Closed dmhai closed 10 months ago
5 < num
looks correct to me in this case (it is syntactically equivalent to num > 5
, and is also the order in which the greaterThan_2
function actually evaluates the condition)
it's my fault, and thanks for answer.
========= input code ========= var obConfig = { greaterThan: function (n, t) { return n > t; }, greaterThan_2: function (n, t) { return t < n; //also greater than function, just Swap parameter position }, };
function testFunc() { var num = "".length; if (obConfig.greaterThan(num, 5)) { console.log(">5"); }
if (obConfig.greaterThan_2(num, 5)) { console.log(">5"); }
}
========= deobfuscator result ========= function testFunc() { var num = "".length; if (num > 5) { console.log(">5"); } if (5 < num) { <<== Deobfuscate error here, it should be : num > 5 console.log(">5"); } }