I was wondering if anyone might have any suggestions on how to log javascript interactions with a browser in C#. The reason behind it is I would like to design a web crawler that take note of any javascript interactions, which I would like to potentially sift through to find any sort of malicious calls of any kind.
Asked
Active
Viewed 94 times
0
-
2How do you intend to do this? As a browser plugin? Because capturing JavaScript things from the server side is impossible. – Cobra_Fast Dec 03 '12 at 21:57
-
This will get you started on the right track: http://stackoverflow.com/a/3182411/1232818 – Christopher Bales Dec 03 '12 at 21:59
1 Answers
0
You must capture what happens under the server's hood first, so you may need a logging tool like this: jqlog
A logging framework plugin for jQuery that can be configured and extended allowing you to "roll your own" logging framework.
Basic usage:
(function($) {
$(document).ready(function() {
$.jqlog.enabled(true);
$.jqlog.log("Log entry");
$.jqlog.info("Information entry");
$.jqlog.warn("Warning entry");
$.jqlog.error("Error entry");
});
})(jQuery);
After this, you can use C# or whatever your want, but you must understand what happens with your Javascript code.

George Netu
- 2,758
- 4
- 28
- 49