Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

breakpoints in single-lined js-scripts with firebug

i want to analyze an external js-file. but the file is single-lined and obfuscated. so i cannot set meaningful breakpoints. (though automatical unobfuscation, code-indentation is assumed to be possible).

first of all, what would your suggestion be to overcome that impairement?

i wonder if it is possible to replace an external js-file with an unobfuscated nice-looking (maybe altered one) and have this one executed instead. any ideas?

like image 411
Raffael Avatar asked Nov 14 '22 01:11

Raffael


1 Answers

i found a way. i am not accepting my answer as the answer b/c its not as comfortable as i would like it to be. so i am interested in further ideas.

you install foxyproxy and configure a new proxy for '*filename.js' (mind the asterisk!). as you host you use a local server, so '192.168.?.?' or 'localhost'.

thing is if the URL of the js-file to be replaced is 'http://www.abc.net/dir1/dir2/filename.js' then you have to make your new js-file accessible at 'http://[host]/dir1/dir2/filename.js'.

that setup is somewhat complicated. it should be possible to have the js-file replaced by another file anywhere on your disk. but it does the job.

like image 115
Raffael Avatar answered Jan 06 '23 12:01

Raffael