De-obfuscate Javascript code to make it readable again

前端 未结 6 1611
小蘑菇
小蘑菇 2020-11-29 23:22

I hate to bring this here, while doing the learning of obfuscating the JS code, I encoded my code and then over wrote the orginal one without any backup :) Following is my o

6条回答
  •  星月不相逢
    2020-11-30 00:01

    Here it is:

    function call_func(input) {
        var evaled = eval('(' + input + ')');
        var newDiv = document.createElement('div');
        var id = evaled.id;
        var name = evaled.Student_name;
        var dob = evaled.student_dob;
        var html = 'ID:';
        html += '' + id + '';
        html += '
    '; html += 'Student Name:'; html += name; html += '
    '; html += 'Student DOB:'; html += dob; html += '
    '; newDiv.innerHTML = html; newDiv.setAttribute('class', 'view'); $('#StudentGridViewId').find('.items').prepend(newDiv); };

提交回复
热议问题