嘿嘿,U盘恶作剧!

2008-4-7 Nie.Meining Coding

昨天写了个小程序,可以作为U盘工具的雏形,比如U盘小偷什么的。

#define UNICODE

#define _UNICODE

#include <windows.h>

#include <windowsx.h>

#include <Dbt.h>

#include <tchar.h>

#include "resource.h"


阅读全文>>

评论(0) 浏览(24544)

【转载】Disabling Escape in modal dialog boxes

2008-4-6 Nie.Meining Coding

Today I spent a lot of time on a seemingly simple task. I’m writing a tool I need for Jayden using the Win32 API. In general, I quite like the Win32 API, but I ran into an annoying quirk today. I finally found the solution and I’m documenting it here to help other people that might run into the same problem and to make sure I don’t have to go through all this trouble again if I run into this problem in the future.

What I want sounds quite simple: I want to make it impossible for the user to close my modal dialog box by pressing Escape. Normally, this would break expected behaviour, but if you’re using a dialog box as your main window, it actually makes sense. I’ll go over the procedure to do this step by step. Don’t leave before we get to multiline edit controls, though, because that’s where it really gets weird.

阅读全文>>

评论(0) 浏览(2905)

Some Tips on STL

2008-2-27 Nie.Meining Coding

Today I have reread Effective STL roughly in the C++ Class.  Here I take some notes:
The four numeric algorithms in <numeric>:
accumulate
inner_product
adjacent_difference
partial_sum

The algorithms about copy:
copy
copy_backward

阅读全文>>

评论(0) 浏览(24038)

提取ShellCode测试

2007-12-7 Nie.Meining Debug

今天在vista平台下做了提取ShellCode的测试,ShellCode功能简单,弹出一个简单Shell。
先做个代码原型:

int main()

{

    system("pause");

}

然后取得system()函数的地址:

#include "windows.h"

阅读全文>>

评论(0) 浏览(3009)

缓冲区溢出学习笔记

2007-12-5 Nie.Meining Debug

一、溢出改写main返回地址:

#include<stdio.h>

#include<stdlib.h>

void why_here(void)

{

    printf("It's a test!\n");

    exit(0);

}

阅读全文>>

评论(0) 浏览(13782)

Powered by emlog