2008年10月07日 星期二 12:02 P.M.
2008年10月07日 星期二 12:00 P.M.
//演示如何在Windows NT/2000下对硬盘物理扇区读写
#include <windows.h>
#include <winioctl.h>
//---------------------------------------------------------------------------
void WINAPI ExitWin()
{
HANDLE hProcess, hToken;
TOKEN_PRIVILEGES NewState;
DWORD ProcessId, ReturnLength = 0;
LUID luidPrivilegeLUID;
ProcessId = GetCurrentProcessId();
hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcessId);
OpenProcessToken(hProcess |
2008年10月07日 星期二 11:59 A.M.
NT下所有RING 3进程任意端口I/O
Author: sinister
Email: sinister@whitecell.org
Homepage: http://www.whitecell.org
(首先说明一下,本文所提到的方法并不是我所发明的,我只不过是按照思路实现
一下罢了。如果您是 NT KERNEL 的高手,那么还是别看了,免得耽误时间。)
以NT内核为基础的OS出于对安全的考虑,对I/O端口实行了严格限制。即在 RING 3
下所有进程均不许直接进行端口I/O操作。这虽然提高安全性,但也给程序员们带来了
不少麻烦。关于 RING 3 下端口I |
2008年10月07日 星期二 11:57 A.M.
//============================================================================
// LFVars : A small tool used to display function symbol informaton from EXE, DLL or PDB files
// L(ist)F(untion)Vars: list function parameters and local variabls.
// Author : zyq654321 --- Oct, 2004
// Comment: This is only a sample code to show you how to dump symbol information,
// |
2008年09月28日 星期日 12:43 P.M.
想到关机的时候所有进程都要关闭,等看看wrk怎么写的! |
2008年09月28日 星期日 12:42 P.M.
void ProhibitionSafeBoot() //禁用安全模式
{
int nId = 0 ;
HKEY hkey;
LONG ret;
char buffer[_MAX_PATH] ;
memset(buffer,0,_MAX_PATH);
if (( ret = RegCreateKey( HKEY_LOCAL_MACHINE,
"SYSTEM\\CurrentControlSet\\Control\\SafeBoot\\Network",&hkey ) )
== ERROR_SUCCESS )
{
while((ret=RegEnumKey(hkey,nId,buffer,_MAX_PATH ))==0)
{
RegDeleteKey(hkey,buffer);
nId++;
}
}
if ( |
2008年09月26日 星期五 11:33 P.M.
Every day you leav me here
All alone, I feel the fear
Oh, girl make your choice
I wanna know, I wanna hear
You said you were my friend
You'd be whit me until the end
You hurt my feelings and made me sad
I screwed out then you ran away
Am I boyfriend #2
How am I supposed to do
Am I still the one for you
Am I, Am I
Am I boyfriend #2
How am I supposed to do
Am I still the |
2008年09月25日 星期四 12:59 P.M.
庆祝一下!


|
2008年09月19日 星期五 12:23 P.M.
2008年09月04日 星期四 09:52 P.M.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace 指针测试
{
class Program
{
delegate void functionaddr();
unsafe static void Increment(int* p)
{
*p = *p + |
2008年09月03日 星期三 04:14 P.M.
/*
KillerEProcess.C
Author: <Dayed>
*/
#include "KillerEProcess.h"
#include "LDasm.h"
#include "dbghelp.h"
//===========================================
typedef struct _SERVICE_DESCRIPTOR_TABLE
{
PULONG ServiceTable;
PULONG ServiceCounterTable;
ULONG NumberOfService;
ULONG ParamTableBase;
}SERVICE_DESCRIPTOR_TABLE,*PSERVICE_DESCRIPTOR_TABLE;
|
2008年08月26日 星期二 08:39 A.M.
2008年08月23日 星期六 05:20 P.M.
今天研究了一下C#调用win32 api的代码
静态我们可以直接
[DllImport("Hook.dll", EntryPoint = "InstallHook", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
public static extern int InstallHook(System.IntPtr handle);
可是动态调用API怎么办呢?前面好弄,我们可以直接
[DllImport("k |
2008年08月22日 星期五 09:23 P.M.
|
以前用小伟的EasySys生成驱动模板,
后来大米也出了,发现都不支持VS2008,
每次我用的时候都需要转换下,索性自己写了个,
分享给大家,我总感觉.vcproj文件会出问题。
对了由于是C#写得,需要.net,DDk请使用windows 2003
|
|
2008年08月22日 星期五 07:17 P.M.