1

I am using a fuzzer called nduja which is written in Javascript embedded in html body. It creates random dom tree on the fly with every refresh but sadly the html state cant be saved.

It creates dom tree but I dont know how to convert that dom tree to html. (Debugged it in firebug and I am able to see changing value for dom tree on every refresh but html code remains same)

I want to convert that dom tree to html on the fly as even in run-time the source code of html is still same.

I am novice in javascript thus seeking your precious help in this regard.

Note to mods: Please reject it if you find it is a vague question, I tried searching it but coudnt get a specific answer to this query

  • Do you have any code for us to see, preferably a jsfiddle or similar? To make your question more concrete... – Jorg Feb 26 '14 at 08:30
  • Yes I do have it. Here is the link its too big so coudnt copy paste here. https://sites.google.com/site/tentacoloviola/fuzzing-with-dom-level-2-and-3/nduja11.html?attredirects=0&d=1 – user3354841 Feb 26 '14 at 08:32
  • possible duplicate of [Saving the DOM as HTML after modification](http://stackoverflow.com/questions/3314742/saving-the-dom-as-html-after-modification) – Ortomala Lokni Dec 29 '14 at 13:08

1 Answers1

0

In the question Saving the DOM as HTML after modification there is one solution to your problem:

With jQuery you could use var html = $(document).html(); Then post the html with $.ajax() to the controller where you choose to save it.

Community
  • 1
  • 1
Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240