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

时间:2006-10-12 来源: 作者: 点击:
程序自杀(进程自己结束自己) 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 Unm
  
  程序自杀(进程自己结束自己)
  
  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);
  }
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容