vista下新的日志工具
cmd /c wevtutil gl application
cmd /c wevtutil gl system
cmd /c wevtutil el
I spent a couple of hours tonight reversing the vulnerable code responsible for the MS08-067 vulnerability. This bug is pretty interesting, because it is in the same area of code as the MS06-040 buffer overflow, but it was completely missed by all security researchers and Microsoft. It’s quite embarassing.
Here’s the code of the vulnerable function on Windows XP SP3 and Vista SP1:
#include <wchar.h>
// This is the decompiled function sub_5B86A51B in netapi32.dll on XP SP3 // and sub_6EA11D4D on Vista SP1 int ms08_067(wchar_t* path) { wchar_t* p; wchar_t* q; wchar_t* previous_slash = NULL; wchar_t* current_slash = NULL; wchar_t ch; 继续阅读 »
1. 是否要写注释
写注释能让你更好的思考程序在干什么,但是糟糕的注释适得其反。
2. 如何高效的注释
应该通过书写具有意义的变量名,子程序名来避免过多的注释。注释不是重复描述代码,而是对代码的补充说明。
3. 不要注释糟糕的代码,应该重写之。
4. 文件头部的注释应该起到概述的作用,说明文件的内容和实现的主要功能。
5. 对于具体环境和值得注意的地方应该注释,这将为今后问题的解决带来极大的好处。
有德容乃大 无求品自高