开发者

How to break into code when a file has been touched

I inherited an application using a large number of text based files for configuration. The file's names are constructed dynamically in the software, so I can't search directly for a file name in the source code.

Is there any way to break into a program running in the debugger w开发者_如何学运维hen it touches a particular text file?


In your debugger, set a breakpoint at the CreateFile (kernel32.dll) import.

OllyDbg specific:

Press CTRL + G, type in the function name and press F2.


You can set a breakpoint at a specific location (such as calling the function to open the file) if a variable has a specific value.


If you know the place where the files are being open or if the dynamically created file names are assigned to some variable, create an conditional breakpoint that breaks the code execution only if the filename is matching the file that you're interested in.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜