views:

61

answers:

1

Hi There,

I am wanting to find out if it is possible to easily debug a private access field in an object?

Here is a scenario for example sake: An application is running a WebBrowser class that is accessed privately from a class.

Is it possible to stop the application, change the Html of a page and continue the application?

Thanks,

Kyle.

EDIT:

Alright, for clarification. I have a compiled .exe of an application with a WebBrowser control in it that navigates to stackoverflow, for examples sake.

Would one be able to attach a debugger (Visual Studio/Olly/Native/Etc.) to the executable, and alter (through the properties of the WebBrowser) the HTML of the website?

Hope that clears it up a tad, thanks.

A: 

In the debugger, one can edit whatever is loaded in your process, be that via the memory editor, or navigating down through variables.

I'm not overly familiar with the WebBrowser control, but I assume that it offers an object model which would allow one to mutate the DOM resulting from the content downloaded. (All other objects can be navigated in similar ways). The debugger doesnt attempt to enforce any language level rules such as 'private' etc.

If you're wondering whether this is legitimate, yes - if you have OS permission to debug an app, then the memory space is fair game.

Or are you wondering how to do it with this specific control?

(Reply via comments or edits to the question - I still dont know what you're after and I'm guessing others don't either hence the lack of responses)

Ruben Bartelink
I see what you're saying. I'm just trying to find out whether it would be more difficult to debug the application compared to a browser directly. The long and short of what I am trying to accomplish is to make life more difficult for people to debug this specific application, however not by using C++ ASM directives. Thanks.
Kyle Rozendo
In that case I'd say that getting to the stage where one can debug/examine/mutate a piece of javascript code that's hosted in a WebBrowser in a custom app versus in IE isnt significantly different.
Ruben Bartelink
Thank you Ruben.
Kyle Rozendo