Visual C++漏洞利用的一个Tips - tombkeeper的和谐blog - 且谈技术,兼论吃喝,偶谑风月,不言国事。
博客首页|TW首页| 同事录|业界社区





假设有一个Visual C++的漏洞,或者一个可以通过Visual C++触发的漏洞,但是在具体利用的时候不同版本的Visual C++需要区别对待,这时候如何做到通用呢?借助于_MSC_VER这个预定义宏可以很容易地做到:

// VC 6
#if defined(_MSC_VER) && _MSC_VER == 1200
pia pia
#endif

// VC 2005及其以上版本
#if defined(_MSC_VER) && _MSC_VER >= 1400
biu biu
#endif


评论

Good.Be the first to comment on this entry.

Post comment

comment has COPYRIGHT too!