r/javascript • • Oct 25 '13

I created the most horrible JavaScript... "thing" ever.

http://codepen.io/Azeirah/pen/Ecpxa
0 Upvotes

7 comments sorted by

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 :)

2

u/[deleted] Oct 26 '13

Chrome already crashed a lot, but that's because I created some while (true) loops which were a bit.. unstoppable.

1

u/double_integration Oct 27 '13

Don't stop me now...cuz I'm having a good time, having a good time!

1

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

u/[deleted] Oct 25 '13

[deleted]

2

u/[deleted] 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.