黑客软件编写基础知识集合(2)

王朝other·作者佚名  2008-05-19
窄屏简体版  字體: |||超大  

程序自杀(进程自己结束自己)

HMODULE module = GetModuleHandle(0);

CHAR buf[MAX_PATH];

GetModuleFileName(module, buf, sizeof buf);

CloseHandle(HANDLE(4));

__asm

{

lea eax, buf

push 0

push 0

push eax

push ExitProcess

push module

push DeleteFile

push UnmapViewOfFile

ret

}

return;

***********************************************

操作系统信息

//结构OSVERSIONINFO包含操作系统的版本信息

OSVERSIONINFO osvi;

CString winver,os;

osvi.dwOSVersionInfoSize=sizof(OSVERSIONINFO);

GetVersionEx(&osvi);

switch(osvi.dwPlatformId)

{

case 0:

os="Win 3.X";

break;

case 1:

os="Win 9X";

break;

case 2:

os="Win NT/2000/XP";

break;

default:

os="Other OS";

break;

}

***********************************************

隐藏你的鼠标

(注意:注销或重新启动就可以恢复)

一、建立一个单文档的应用程序框架

二、为隐藏主窗口,将OnCreate 删除。

并在App类里修改m_pMainWnd指向ShowWindow(SW_HIDE)

三、现在在mainframe的实现文件里添加如下内容:

POINT mp,cursorNew;

/////////////////////////////////////

// CMainFrame construction/destruction

UINT FMouse(LPVOID param)

{

int flag=0;

WINDOWPLACEMENT wp;///窗口位置

wp.length=sizeof(WINDOWPLACEMENT);

HWND hWnd;

char tmp[20];

RECT rt;

hWnd=GetDesktopWindow();////GetForegroundWindow();

GetWindowPlacement(hWnd,&wp);

GetWindowRect(hWnd,&rt);

GetWindowText(hWnd,tmp,20);

HDC dc=GetDC((HWND)param);

int iResult;

iResult=AfxMessageBox("确实要隐藏吗?",MB_OKCANCEL);

if(iResult==IDOK)

{

while(1)

{

hWnd=GetForegroundWindow();//GetDesktopWindow();

GetWindowRect(hWnd,&rt);

GetWindowText(hWnd,tmp,20);

GetWindowPlacement(hWnd,&wp);

GetCursorPos(&cursorNew);

while(1){

::mouse_event(MOUSEEVENTF_MOVE,cursorNew.x,cursorNew.y,0,0);

}

}

}

return 0;

}

在构造函数里启动线程CMainFrame::CMainFrame()

{

HWND hWnd=::GetParent(NULL);

GetCursorPos(&mp);

AfxBeginThread(FMouse,hWnd,0);

}

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航