亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sfilter.c

?? 網程絡過濾驅動,可以截獲網絡封包!對其進行分析攔截!
?? C
?? 第 1 頁 / 共 5 頁
字號:
	FastIoDispatch->MdlRead = SfFastIoMdlRead;
	FastIoDispatch->MdlReadComplete = SfFastIoMdlReadComplete;
	FastIoDispatch->PrepareMdlWrite = SfFastIoPrepareMdlWrite;
	FastIoDispatch->MdlWriteComplete = SfFastIoMdlWriteComplete;
	FastIoDispatch->FastIoReadCompressed = SfFastIoReadCompressed;
	FastIoDispatch->FastIoWriteCompressed = SfFastIoWriteCompressed;
	FastIoDispatch->MdlReadCompleteCompressed = SfFastIoMdlReadCompleteCompressed;
	FastIoDispatch->MdlWriteCompleteCompressed = SfFastIoMdlWriteCompleteCompressed;
	FastIoDispatch->FastIoQueryOpen = SfFastIoQueryOpen;

	DriverObject->FastIoDispatch = FastIoDispatch;

// 
// VERSION NOTE:
// 
// There are 6 FastIO routines for which file system filters are bypassed as
// the requests are passed directly to the base file system.  These 6 routines
// are AcquireFileForNtCreateSection, ReleaseFileForNtCreateSection,
// AcquireForModWrite, ReleaseForModWrite, AcquireForCcFlush, and 
// ReleaseForCcFlush.
// 
// In Windows XP and later, the FsFilter callbacks were introduced to allow
// filters to safely hook these operations.  See the IFS Kit documentation for
// more details on how these new interfaces work.
// 
// MULTIVERSION NOTE:
// 
// If built for Windows XP or later, this driver is built to run on 
// multiple versions.  When this is the case, we will test
// for the presence of FsFilter callbacks registration API.  If we have it,
// then we will register for those callbacks, otherwise, we will not.
// 

#if WINVER >= 0x0501

	{
		FS_FILTER_CALLBACKS FsFilterCallbacks;

		if (NULL != gSfDynamicFunctions.RegisterFileSystemFilterCallbacks)
		{
			// 
			// Setup the callbacks for the operations we receive through
			// the FsFilter interface.
			// 
			// NOTE:  You only need to register for those routines you really need
			//		to handle.  SFilter is registering for all routines simply to
			//		give an example of how it is done.
			// 
			FsFilterCallbacks.SizeOfFsFilterCallbacks = sizeof(FS_FILTER_CALLBACKS);
			FsFilterCallbacks.PreAcquireForSectionSynchronization = SfPreFsFilterPassThrough;
			FsFilterCallbacks.PostAcquireForSectionSynchronization = SfPostFsFilterPassThrough;
			FsFilterCallbacks.PreReleaseForSectionSynchronization = SfPreFsFilterPassThrough;
			FsFilterCallbacks.PostReleaseForSectionSynchronization = SfPostFsFilterPassThrough;
			FsFilterCallbacks.PreAcquireForCcFlush = SfPreFsFilterPassThrough;
			FsFilterCallbacks.PostAcquireForCcFlush = SfPostFsFilterPassThrough;
			FsFilterCallbacks.PreReleaseForCcFlush = SfPreFsFilterPassThrough;
			FsFilterCallbacks.PostReleaseForCcFlush = SfPostFsFilterPassThrough;
			FsFilterCallbacks.PreAcquireForModifiedPageWriter = SfPreFsFilterPassThrough;
			FsFilterCallbacks.PostAcquireForModifiedPageWriter = SfPostFsFilterPassThrough;
			FsFilterCallbacks.PreReleaseForModifiedPageWriter = SfPreFsFilterPassThrough;
			FsFilterCallbacks.PostReleaseForModifiedPageWriter = SfPostFsFilterPassThrough;

			Status = (gSfDynamicFunctions.RegisterFileSystemFilterCallbacks)(DriverObject, &FsFilterCallbacks);
			if (!NT_SUCCESS(Status))
			{
				DriverObject->FastIoDispatch = NULL;
				ExFreePool(FastIoDispatch);
				IoDeleteDevice(gSFilterControlDeviceObject);
				ZwClose(&gRuleFileHandle);
				ExDeleteResourceLite(&gRulesResource);
				return Status;
			}
		}
	}
#endif

	// 
	// The registered callback routine "SfFsNotification" will be called
	// whenever a new file systems is loaded or when any file system is
	// unloaded.
	// 
	// VERSION NOTE:
	// 
	// On Windows XP and later this will also enumerate all existing file
	// systems (except the RAW file systems).  On Windows 2000 this does not
	// enumerate the file systems that were loaded before this filter was
	// loaded.
	// 
	Status = IoRegisterFsRegistrationChange(DriverObject, SfFsNotification);
	if (!NT_SUCCESS(Status))
	{
		KdPrint(("SFilter!DriverEntry: Error registering FS change notification, Status=%08x\n", Status));

		DriverObject->FastIoDispatch = NULL;
		ExFreePool(FastIoDispatch);
		IoDeleteDevice(gSFilterControlDeviceObject);
		ZwClose(&gRuleFileHandle);
		ExDeleteResourceLite(&gRulesResource);
		return Status;
	}

	// 
	// Attempt to attach to the appropriate RAW file system device objects
	// since they are not enumerated by IoRegisterFsRegistrationChange.
	// 
	{
		PDEVICE_OBJECT RawDeviceObject;
		PFILE_OBJECT FileObject;

		// 
		// Attach to RawDisk device
		// 
		RtlInitUnicodeString(&NameString, L"\\Device\\RawDisk");
		Status = IoGetDeviceObjectPointer(
			&NameString,
			FILE_READ_ATTRIBUTES,
			&FileObject,
			&RawDeviceObject
			);
		if (NT_SUCCESS(Status))
		{
			SfFsNotification(RawDeviceObject, TRUE);
			ObDereferenceObject(FileObject);
		}

		// 
		// Attach to the RawCdRom device
		// 
		RtlInitUnicodeString(&NameString, L"\\Device\\RawCdRom");
		Status = IoGetDeviceObjectPointer(
			&NameString,
			FILE_READ_ATTRIBUTES,
			&FileObject,
			&RawDeviceObject
			);
		if (NT_SUCCESS(Status))
		{
			SfFsNotification(RawDeviceObject, TRUE);
			ObDereferenceObject(FileObject);
		}
	}

	// 
	// Clear the initializing flag on the control device object since we
	// have now successfully initialized everything.
	// 
	ClearFlag(gSFilterControlDeviceObject->Flags, DO_DEVICE_INITIALIZING);

	return STATUS_SUCCESS;
}

#if DBG && WINVER >= 0x0501
VOID
DriverUnload(
	IN PDRIVER_OBJECT DriverObject
	)
/*++

Routine Description:

	This routine is called when a driver can be unloaded.  This performs all of
	the necessary cleanup for unloading the driver from memory.  Note that an
	error can NOT be returned from this routine.
	
	When a request is made to unload a driver the IO System will cache that
	information and not actually call this routine until the following states
	have occurred:
	- All device objects which belong to this filter are at the top of their
	  respective attachment chains.
	- All handle counts for all device objects which belong to this filter have
	  gone to zero.

	WARNING: Microsoft does not officially support the unloading of File
			 System Filter Drivers.  This is an example of how to unload
			 your driver if you would like to use it during development.
			 This should not be made available in production code.

Arguments:

	DriverObject - Driver object for this module

Return Value:

	None.

--*/
{
	PSFILTER_DEVICE_EXTENSION DevExt;
	PFAST_IO_DISPATCH FastIoDispatch;
	NTSTATUS Status;
	ULONG NumDevices;
	ULONG i;
	LARGE_INTEGER Interval;
#	define DEVOBJ_LIST_SIZE 64
	PDEVICE_OBJECT DevList[DEVOBJ_LIST_SIZE];

	ASSERT(DriverObject == gSFilterDriverObject);

	// 
	// Log we are unloading
	// 
	SF_LOG_PRINT(SFDEBUG_DISPLAY_ATTACHMENT_NAMES,
				  ("SFilter!DriverUnload:						Unloading driver (%p)\n",
					DriverObject));

	// 
	// Don't get anymore file system change notifications
	// 
	IoUnregisterFsRegistrationChange(DriverObject, SfFsNotification);

	// 
	// This is the loop that will go through all of the devices we are attached
	// to and detach from them.  Since we don't know how many there are and
	// we don't want to allocate memory (because we can't return an error)
	// we will free them in chunks using a local array on the stack.
	// 
	for (;;)
	{
		// 
		// Get what device objects we can for this driver.  Quit if there
		// are not any more.  Note that this routine should always be
		// defined since this routine is only compiled for Windows XP and
		// later.
		// 

		ASSERT(NULL != gSfDynamicFunctions.EnumerateDeviceObjectList);
		Status = (gSfDynamicFunctions.EnumerateDeviceObjectList)(
			DriverObject,
			DevList,
			sizeof(DevList),
			&NumDevices
			);

		if (NumDevices <= 0)
			break;

		NumDevices = min(NumDevices, DEVOBJ_LIST_SIZE);

		// 
		// First go through the list and detach each of the devices.
		// Our control device object does not have a DeviceExtension and
		// is not attached to anything so don't detach it.
		// 
		for (i=0; i < NumDevices; i++)
		{
			DevExt = DevList[i]->DeviceExtension;
			if (NULL != DevExt)
				IoDetachDevice(DevExt->AttachedToDeviceObject);
		}

		// 
		// The IO Manager does not currently add a reference count to a device
		// object for each outstanding IRP.  This means there is no way to
		// know if there are any outstanding IRPs on the given device.
		// We are going to wait for a reasonable amount of time for pending
		// irps to complete.  
		// 
		// WARNING: This does not work 100% of the time and the driver may be
		//		 unloaded before all IRPs are completed.  This can easily
		//		 occur under stress situations and if a long lived IRP is
		//		 pending (like oplocks and directory change notifications).
		//		 The system will fault when this Irp actually completes.
		//		 This is a sample of how to do this during testing.  This
		//		 is not recommended for production code.
		// 
		Interval.QuadPart = (5 * DELAY_ONE_SECOND);	  // delay 5 seconds
		KeDelayExecutionThread(KernelMode, FALSE, &Interval);

		// 
		// Now go back through the list and delete the device objects.
		// 
		for (i=0; i < NumDevices; i++)
		{
			// 
			// See if this is our control device object.  If not then cleanup
			// the device extension.  If so then clear the global pointer
			// that references it.
			// 
			if (NULL != DevList[i]->DeviceExtension)
				SfCleanupMountedDevice(DevList[i]);
			else
			{
				ASSERT(DevList[i] == gSFilterControlDeviceObject);
				gSFilterControlDeviceObject = NULL;
			}

			// 
			// Delete the device object, remove reference counts added by
			// IoEnumerateDeviceObjectList.  Note that the delete does
			// not actually occur until the reference count goes to zero.
			// 
			IoDeleteDevice(DevList[i]);
			ObDereferenceObject(DevList[i]);
		}
	}

	// 
	// Free our FastIO table
	// 
	FastIoDispatch = DriverObject->FastIoDispatch;
	DriverObject->FastIoDispatch = NULL;
	ExFreePool(FastIoDispatch);

	ExDeletePagedLookasideList(&gFsCtxLookAsideList);
	ExDeletePagedLookasideList(&gFileNameLookAsideList);
	ExDeleteNPagedLookasideList(&gReadWriteCompletionCtxLookAsideList);

	ZwClose(gRuleFileHandle);
	ExDeleteResourceLite(&gRulesResource);
	if (gRules)
		ExFreePoolWithTag(gRules, SFLT_POOL_TAG);
}
#endif

#if WINVER >= 0x0501
VOID
SfLoadDynamicFunctions (
	)
/*++

Routine Description:

	This routine tries to load the function pointers for the routines that
	are not supported on all versions of the OS.  These function pointers are
	then stored in the global structure SpyDynamicFunctions.

	This support allows for one driver to be built that will run on all 
	versions of the OS Windows 2000 and greater.  Note that on Windows 2000, 
	the functionality may be limited.
	
Arguments:

	None.
	
Return Value:

	None.

--*/
{
	UNICODE_STRING FunctionName;

	RtlZeroMemory(&gSfDynamicFunctions, sizeof(gSfDynamicFunctions));

	// 
	// For each routine that we would want to use, lookup its address in the
	// kernel or hal.  If it is not present, that field in our global
	// SpyDynamicFunctions structure will be set to NULL.
	// 

	RtlInitUnicodeString(&FunctionName, L"FsRtlRegisterFileSystemFilterCallbacks");
	gSfDynamicFunctions.RegisterFileSystemFilterCallbacks = MmGetSystemRoutineAddress(&FunctionName);

	RtlInitUnicodeString(&FunctionName, L"IoAttachDeviceToDeviceStackSafe");
	gSfDynamicFunctions.AttachDeviceToDeviceStackSafe = MmGetSystemRoutineAddress(&FunctionName);
	
	RtlInitUnicodeString(&FunctionName, L"IoEnumerateDeviceObjectList");
	gSfDynamicFunctions.EnumerateDeviceObjectList = MmGetSystemRoutineAddress(&FunctionName);

	RtlInitUnicodeString(&FunctionName, L"IoGetLowerDeviceObject");
	gSfDynamicFunctions.GetLowerDeviceObject = MmGetSystemRoutineAddress(&FunctionName);

	RtlInitUnicodeString(&FunctionName, L"IoGetDeviceAttachmentBaseRef");
	gSfDynamicFunctions.GetDeviceAttachmentBaseRef = MmGetSystemRoutineAddress(&FunctionName);

	RtlInitUnicodeString(&FunctionName, L"IoGetDiskDeviceObject");
	gSfDynamicFunctions.GetDiskDeviceObject = MmGetSystemRoutineAddress(&FunctionName);

	RtlInitUnicodeString(&FunctionName, L"IoGetAttachedDeviceReference");
	gSfDynamicFunctions.GetAttachedDeviceReference = MmGetSystemRoutineAddress(&FunctionName);

	RtlInitUnicodeString(&FunctionName, L"RtlGetVersion");
	gSfDynamicFunctions.GetVersion = MmGetSystemRoutineAddress(&FunctionName);
}

VOID
SfGetCurrentVersion (
	)
/*++

Routine Description:

	This routine reads the current OS version using the correct routine based
	on what routine is available.

Arguments:

	None.
	
Return Value:

	None.

--*/
{
	if (NULL != gSfDynamicFunctions.GetVersion)
	{
		RTL_OSVERSIONINFOW VersionInfo;
		NTSTATUS Status;

		// 
		// VERSION NOTE: RtlGetVersion does a bit more than we need, but
		// we are using it if it is available to show how to use it.  It
		// is available on Windows XP and later.  RtlGetVersion and
		// RtlVerifyVersionInfo (both documented in the IFS Kit docs) allow
		// you to make correct choices when you need to change logic based
		// on the current OS executing your code.
		// 
		VersionInfo.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOW);

		Status = (gSfDynamicFunctions.GetVersion)(&VersionInfo);

		ASSERT(NT_SUCCESS(Status));

		gSfOsMajorVersion = VersionInfo.dwMajorVersion;
		gSfOsMinorVersion = VersionInfo.dwMinorVersion;
		
	}
	else
	{
		PsGetVersion(&gSfOsMajorVersion,
			&gSfOsMinorVersion,
			NULL,
			NULL
			);
	}
}
#endif

VOID
SfFsNotification(
	IN PDEVICE_OBJECT DeviceObject,
	IN BOOLEAN FsActive
	)
/*++

Routine Description:

	This routine is invoked whenever a file system has either registered or
	unregistered itself as an active file system.

	For the former case, this routine creates a device object and attaches it
	to the specified file system's device object.  This allows this driver
	to filter all requests to that file system.  Specifically we are looking
	for MOUNT requests so we can attach to newly mounted volumes.

	For the latter case, this file system's device object is located,
	detached, and deleted.  This removes this file system as a filter for
	the specified file system.

Arguments:

	DeviceObject - Pointer to the file system's device object.

	FsActive - Boolean indicating whether the file system has registered
		(TRUE) or unregistered (FALSE) itself as an active file system.

Return Value:

	None.

--*/
{
	UNICODE_STRING Name;
	WCHAR NameBuffer[MAX_DEVNAME_LENGTH];

	PAGED_CODE();

	// 
	// Init local Name buffer
	// 
	RtlInitEmptyUnicodeString(&Name, NameBuffer, sizeof(NameBuffer));

	SfGetObjectName(DeviceObject, &Name);

	// 
	// Display the names of all the file system we are notified of
	// 
	SF_LOG_PRINT(SFDEBUG_DISPLAY_ATTACHMENT_NAMES,
		("SFilter!SfFsNotification:					%s	%p \"%wZ\" (%s)\n",
		(FsActive) ? "Activating file system  " : "Deactivating file system",
		DeviceObject,
		&Name,
		GET_DEVICE_TYPE_NAME(DeviceObject->DeviceType))
		);

	// 
	// Handle attaching/detaching from the given file system.
	// 
	if (FsActive)
		SfAttachToFileSystemDevice(DeviceObject, &Name);
	else
		SfDetachFromFileSystemDevice(DeviceObject);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
717成人午夜免费福利电影| 精品国精品国产| 欧美一区日本一区韩国一区| 日本一区二区久久| 日韩高清不卡一区二区三区| 成人av综合在线| 日韩一级免费一区| 亚洲精品大片www| 懂色av一区二区三区免费观看| 欧美人与z0zoxxxx视频| 成人欧美一区二区三区1314| 精品一区二区三区av| 精品视频全国免费看| 亚洲男女一区二区三区| 国产福利精品导航| 精品国产123| 蜜臀91精品一区二区三区 | 亚洲乱码国产乱码精品精的特点 | 国产一区二区三区在线观看免费视频 | 国产人妖乱国产精品人妖| 图片区小说区区亚洲影院| 91蜜桃婷婷狠狠久久综合9色| 久久久影视传媒| 精品一区二区国语对白| 欧美一卡2卡三卡4卡5免费| 亚洲一区二区综合| 欧美日韩亚洲丝袜制服| 午夜影院久久久| 欧美日韩国产综合一区二区三区| 一区二区三区四区激情| 一本大道综合伊人精品热热| 国产精品高潮呻吟| aaa亚洲精品| 亚洲精品国产一区二区精华液| 91色porny在线视频| 1024成人网| 色94色欧美sute亚洲13| 一二三区精品视频| 欧美亚一区二区| 亚洲gay无套男同| 欧美一级午夜免费电影| 麻豆国产欧美日韩综合精品二区| 日韩欧美成人激情| 国产一区二区女| 中文字幕av一区 二区| 色综合久久久网| 亚洲综合自拍偷拍| 欧美日韩三级在线| 另类的小说在线视频另类成人小视频在线| 这里只有精品99re| 蜜乳av一区二区| 久久九九全国免费| 色综合久久中文综合久久97 | 国产精品欧美极品| 色屁屁一区二区| 日韩成人av影视| 国产亚洲精品资源在线26u| 9l国产精品久久久久麻豆| 亚洲国产裸拍裸体视频在线观看乱了| 欧美一级高清大全免费观看| 国产精品88888| 亚洲精品国产a久久久久久| 正在播放一区二区| 成人av网在线| 日本vs亚洲vs韩国一区三区二区 | 成人激情黄色小说| 亚洲国产精品久久久久秋霞影院 | 亚洲欧美视频在线观看视频| 在线亚洲欧美专区二区| 久久精品72免费观看| 国产精品理论片在线观看| 欧美日韩五月天| 国产高清精品网站| 亚洲国产综合91精品麻豆| 久久精品亚洲精品国产欧美| 欧美综合久久久| 国产成人免费9x9x人网站视频| 亚洲国产aⅴ成人精品无吗| 精品国产一区二区三区av性色 | 亚洲成av人片一区二区三区| 国产日韩精品一区二区三区在线| 欧美视频日韩视频在线观看| 国产盗摄一区二区三区| 亚洲成人在线免费| 中文字幕一区二| 久久网这里都是精品| 欧美日韩亚洲综合一区| 91网站最新地址| 国产成人无遮挡在线视频| 青青草原综合久久大伊人精品优势| 国产精品久久久久久户外露出 | 国产一区二区视频在线| 婷婷久久综合九色国产成人 | 欧美日韩的一区二区| 9i看片成人免费高清| 国产精品一区二区在线播放| 日韩av在线免费观看不卡| 亚洲欧美日韩中文字幕一区二区三区 | 欧美日韩在线亚洲一区蜜芽| av不卡一区二区三区| 国产美女久久久久| 蜜臀久久久99精品久久久久久| 亚洲一二三区在线观看| 亚洲欧美另类久久久精品2019| 国产亚洲一区二区三区| 2019国产精品| 欧美精品一区二区三区高清aⅴ | 在线观看日韩av先锋影音电影院| 国产成人aaaa| 国产成人在线观看| 国产一区二区三区观看| 国模一区二区三区白浆| 国产在线一区观看| 精品一区二区三区视频| 久草中文综合在线| 激情丁香综合五月| 国产精品综合av一区二区国产馆| 激情综合色综合久久综合| 久久99精品久久久久| 极品美女销魂一区二区三区| 国产成人亚洲综合a∨婷婷| 成人免费视频国产在线观看| av不卡在线播放| 在线观看免费一区| 欧美欧美欧美欧美首页| 欧美大片在线观看一区二区| 久久新电视剧免费观看| 中文字幕国产精品一区二区| 中文字幕一区二区三区不卡| 一区二区三区欧美日| 亚洲成人免费看| 国内精品写真在线观看| 99久久伊人精品| 欧美性xxxxxxxx| 日韩美女主播在线视频一区二区三区| 精品成人a区在线观看| 国产精品久线观看视频| 亚洲综合一区二区三区| 麻豆成人av在线| 成人午夜伦理影院| 欧日韩精品视频| 亚洲精品在线三区| 中文字幕在线不卡视频| 天堂va蜜桃一区二区三区| 国产在线精品一区二区三区不卡| 成人一区二区三区中文字幕| 欧美在线观看你懂的| 2021中文字幕一区亚洲| 亚洲一区在线播放| 国产激情精品久久久第一区二区| 一本久久综合亚洲鲁鲁五月天| 678五月天丁香亚洲综合网| 国产午夜精品一区二区三区嫩草 | 欧美日韩二区三区| 久久久久久久久久久99999| 伊人开心综合网| 九色|91porny| 在线国产亚洲欧美| 国产清纯白嫩初高生在线观看91| 性欧美疯狂xxxxbbbb| 9人人澡人人爽人人精品| 欧美大胆人体bbbb| 一区二区视频在线看| 国产精品一线二线三线| 欧美精品黑人性xxxx| 亚洲天堂精品在线观看| 精品在线亚洲视频| 欧美日韩视频在线第一区| 国产精品盗摄一区二区三区| 黑人巨大精品欧美一区| 欧美美女黄视频| 日韩码欧中文字| 国产69精品一区二区亚洲孕妇| 欧美疯狂性受xxxxx喷水图片| 亚洲天堂久久久久久久| 国产91精品入口| 亚洲精品在线免费观看视频| 奇米精品一区二区三区四区| 在线观看av一区| 亚洲精品久久7777| www.亚洲在线| 国产日韩欧美精品电影三级在线| 激情欧美一区二区三区在线观看| 欧美精品第一页| 亚洲成人自拍偷拍| 欧美亚洲免费在线一区| 亚洲品质自拍视频网站| 91视频在线观看免费| 国产精品毛片高清在线完整版| 国产精品1区2区3区在线观看| 精品日韩欧美一区二区| 轻轻草成人在线| 日韩午夜中文字幕| 青青草国产精品97视觉盛宴| 欧美精品v日韩精品v韩国精品v| 亚洲.国产.中文慕字在线| 欧美日韩午夜在线| 日韩va亚洲va欧美va久久| 日韩一区二区三区精品视频| 日韩av一区二区在线影视|