r/javascript • u/[deleted] • Oct 25 '13
I created the most horrible JavaScript... "thing" ever.
http://codepen.io/Azeirah/pen/Ecpxa1
u/PlNG Oct 25 '13
I'm saving this, I could use a random javascript code generator in the near future.
Have you considered applying this technology towards making a javascript based jsfunfuzz?
1
u/a-t-k Frontend Engineer Oct 28 '13
If you want to fuzz JS more effectively, instead of allowed characters, make a list of allowed entities (declared variables, numbers, strings, comparisons, loops, functions, closures, recursions, keywords etc.).
0
Oct 25 '13
[deleted]
2
Oct 25 '13
// Clicking the generate button generates WORKING Javascript code... It's 100% pseudorandom (as random as the Math.random() function). It's.. the worst thing I ever did.
// The box displays generated JS code.
// Fun fact: Statistically, it's possible that this code becomes skynet.
2
u/radhruin Oct 26 '13
You've created a basic fuzzer! As someone who works on a Javascript runtime (Chakra), I spend a lot of my days writing code to do similar things! Next step, see if you can crash any browsers :)