One common technique I use is xor bruteforcing on binary data. In this case, I would like a heuristic approach to determine whether or not any possible candidate plaintexts are javascript. This rules out the file command in unix like systems because it is merely recognized as ASCII text.
I am looking for suggestions on how to solve this problem (Tools, Techniques, Procedures).