I have about 80000 lines of javascript along with an HTML file. Please supply a list of Perl regexp transformations to rename the identifiers (JS variables, function names, etc.) to meaningful names. They are currently things like "Cb", "Fc", "T9a", etc.
(EDIT May 29: Deliverable is not a script; see the note at the end of this post)Each line in the Perl script you give to me should transform $_, assuming $_ is a line of the JavaScript code that I supply you. For example:
s/this\.gB/this.descriptive_name/g;
Example of complete Perl script (including boilerplate code):
#!/usr/bin/perl -w
use warnings;
use strict;
open INPUT_JS, "open OUTPUT_JS, ">output.js" or die "Failed to open";
foreach () {
s/this\.gB/this.descriptive_name/g;
s/Ay/other_name/g;
... # hundreds of other lines
print OUTPUT_JS $_;
}
Example input:
function YPb(b, a) {
var c = a.ka();
return c != 2 && c != 3 && c != 4 ? !1 : (c = uj(b.Fa())) && c.Ef() ? a.jv() ? c.Ef().ha() && c.Ef().Rb() : a.Da() : !1
}
Execution time is not important, but correctness and completeness are. Specify a price that takes into account Bitcoin's value fluctuations, since its value is likely to have changed significantly over the course of this work. After I pay you, if I like your work, a follow-up job will be to comment the result of the last job.
I prefer IRC for communication. Please specify if this is okay with you. Keep me updated periodically on your progress. I can pay incrementally as you get more of the work done.
Deliverable will be the Perl script (not the output JS). (EDIT May 29: the deliverable is the JavaScript: see note at the end) Payment will be in Bitcoin.
tl/dr: This is not a quick job, but it will definitely stimulate your gray matter. Can anyone handle this? Is anyone
man enough for this?
I DIDN'T THINK SO.
Useful Resources:
http://perldoc.perl.org/perlre.html http://jsbeautifier.org/ http://www.prototypejs.org/api https://developer.mozilla.org/en/JavaScript https://developer.mozilla.org/en/JavaScript/Guide/ClosuresEDIT May 29:Now, the deliverable is the de-obfuscated JavaScript, along with the complete, repeatable procedure (in English and/or pseudo-code) that you followed to de-obfuscate it.