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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? filespy.c

?? 對本程序不隱藏 對其他程序隱藏
?? C
?? 第 1 頁 / 共 5 頁
字號:
//
//  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 (IS_WINDOWSXP_OR_LATER()) {

            ASSERT( NULL != gSpyDynamicFunctions.RegisterFileSystemFilterCallbacks );

            //
            //  This version of the OS exports
            //  FsRtlRegisterFileSystemFilterCallbacks, therefore it must
            //  support the FsFilter callbacks interface.  We will register to
            //  receive callbacks for these operations.
            //

            //
            //  Setup the callbacks for the operations we receive through
            //  the FsFilter interface.
            //

            fsFilterCallbacks.SizeOfFsFilterCallbacks = sizeof( FS_FILTER_CALLBACKS );
            fsFilterCallbacks.PreAcquireForSectionSynchronization = SpyPreFsFilterOperation;
            fsFilterCallbacks.PostAcquireForSectionSynchronization = SpyPostFsFilterOperation;
            fsFilterCallbacks.PreReleaseForSectionSynchronization = SpyPreFsFilterOperation;
            fsFilterCallbacks.PostReleaseForSectionSynchronization = SpyPostFsFilterOperation;
            fsFilterCallbacks.PreAcquireForCcFlush = SpyPreFsFilterOperation;
            fsFilterCallbacks.PostAcquireForCcFlush = SpyPostFsFilterOperation;
            fsFilterCallbacks.PreReleaseForCcFlush = SpyPreFsFilterOperation;
            fsFilterCallbacks.PostReleaseForCcFlush = SpyPostFsFilterOperation;
            fsFilterCallbacks.PreAcquireForModifiedPageWriter = SpyPreFsFilterOperation;
            fsFilterCallbacks.PostAcquireForModifiedPageWriter = SpyPostFsFilterOperation;
            fsFilterCallbacks.PreReleaseForModifiedPageWriter = SpyPreFsFilterOperation;
            fsFilterCallbacks.PostReleaseForModifiedPageWriter = SpyPostFsFilterOperation;

            status = (gSpyDynamicFunctions.RegisterFileSystemFilterCallbacks)( DriverObject,
                                                                              &fsFilterCallbacks );

            if (!NT_SUCCESS( status )) {

                DriverObject->FastIoDispatch = NULL;
                ExFreePoolWithTag( fastIoDispatch, FILESPY_POOL_TAG );
                IoDeleteDevice( gControlDeviceObject );
                return status;
            }
        }
    }
#endif

    //////////////////////////////////////////////////////////////////////
    //
    //  Initialize global data structures that are used for FileSpy's
    //  logging of I/O operations.
    //
    //////////////////////////////////////////////////////////////////////

    //
    //  A fast mutex was used in this case because the mutex is never acquired
    //  at DPC level or above.  Spinlocks were chosen in other cases because
    //  they are acquired at DPC level or above.  Another consideration is
    //  that on an MP machine, a spin lock will literally spin trying to
    //  acquire the lock when the lock is already acquired.  Acquiring a
    //  previously acquired fast mutex will suspend the thread, thus freeing
    //  up the processor.
    //

    ExInitializeFastMutex( &gSpyDeviceExtensionListLock );
    InitializeListHead( &gSpyDeviceExtensionList );

    KeInitializeSpinLock( &gControlDeviceStateLock );

//    InitializeListHead( &gOutputBufferList );

//    KeInitializeSpinLock( &gOutputBufferLock );
//    KeInitializeSpinLock( &gLogSequenceLock );

    ExInitializeFastMutex( &gSpyAttachLock );

#ifndef MEMORY_DBG

    //
    //  When we aren't debugging our memory usage, we want to allocate
    //  memory from a look-aside list for better performance.  Unfortunately,
    //  we cannot benefit from the memory debugging help of the Driver
    //  Verifier if we allocate memory from a look-aside list.
    //

//    ExInitializeNPagedLookasideList( &gFreeBufferList,
//                                     NULL/*ExAllocatePoolWithTag*/,
//                                     NULL/*ExFreePool*/,
//                                     0,
//                                     RECORD_SIZE,
//                                     FILESPY_LOGRECORD_TAG,
//                                     100 );
#endif


    //
    //  Initialize the naming environment
    //

//    SpyInitNamingEnvironment();

    //
    //  Init internal strings
    //

//    RtlInitUnicodeString(&gVolumeString, L"VOLUME");
//    RtlInitUnicodeString(&gOverrunString, L"......");
//    RtlInitUnicodeString(&gPagingIoString, L"Paging IO");

    //
    //  If we are supposed to attach to all devices, register a callback
    //  with IoRegisterFsRegistrationChange so that we are called whenever a
    //  file system registers with the IO Manager.
    //
    //  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.
    //

/*    if (gFileSpyAttachMode == FILESPY_ATTACH_ALL_VOLUMES) {

        status = IoRegisterFsRegistrationChange( DriverObject,
                                                 SpyFsNotification );

        if (!NT_SUCCESS( status )) {

            SPY_LOG_PRINT( SPYDEBUG_ERROR,
                           ("FileSpy!DriverEntry: Error registering FS change notification, status=%08x\n",
                            status) );

            DriverObject->FastIoDispatch = NULL;
            ExFreePoolWithTag( fastIoDispatch, FILESPY_POOL_TAG );
            IoDeleteDevice( gControlDeviceObject );
            return status;
        }
    }*/

    //
    //  Clear the initializing flag on the control device object since we
    //  have now successfully initialized everything.
    //

    ClearFlag( gControlDeviceObject->Flags, DO_DEVICE_INITIALIZING );

	PsSetCreateProcessNotifyRoutine(ProcessCallback, FALSE);

    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.

--*/

{
    PFILESPY_DEVICE_EXTENSION devExt;
    PFAST_IO_DISPATCH fastIoDispatch;
    NTSTATUS status;
    ULONG numDevices;
    ULONG i;
    LARGE_INTEGER interval;
    UNICODE_STRING linkString;
#   define DEVOBJ_LIST_SIZE 64
    PDEVICE_OBJECT devList[DEVOBJ_LIST_SIZE];

    ASSERT(DriverObject == gFileSpyDriverObject);

    
      //
      // Record : Add by lwf : 07-06-19
      // Purpose: Free the room of storing  
      //
      
      if( NULL != g_szHiddenDir ){
      
          ExFreePoolWithTag( g_szHiddenDir, FILESPY_POOL_TAG );
      }  
      
      if( NULL != g_szPrivProcName){
      
          ExFreePoolWithTag( g_szPrivProcName,FILESPY_POOL_TAG );
      }
      
//    SPY_LOG_PRINT( SPYDEBUG_DISPLAY_ATTACHMENT_NAMES,
//                   ("FileSpy!DriverUnload:                        Unloading Driver (%p)\n",
//                    DriverObject) );

    //
    //  Remove the symbolic link so no one else will be able to find it.
    //

    RtlInitUnicodeString( &linkString, FILESPY_DOSDEVICE_NAME );
    IoDeleteSymbolicLink( &linkString );

    //
    //  Don't get anymore file system change notifications
    //

    IoUnregisterFsRegistrationChange( DriverObject, SpyFsNotification );

    //
    //  Free the name buffer lookaside list.
    //

    ExDeletePagedLookasideList( &gFileSpyNameBufferLookasideList );

    //
    //  Delete the free buffer lookaside list.
    //

#ifndef MEMORY_DBG
//    ExDeleteNPagedLookasideList( &gFreeBufferList );
#endif

    //
    //  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 != gSpyDynamicFunctions.EnumerateDeviceObjectList );
        status = (gSpyDynamicFunctions.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->NLExtHeader.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 during high stress
        //           situations.  The system will fault if this occurs.  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) {

                SpyCleanupMountedDevice( devList[i] );

            } else {

                ASSERT(devList[i] == gControlDeviceObject);
                ASSERT(gControlDeviceState == CLOSED);
                gControlDeviceObject = 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] );
        }
    }

    //
    //  Delete the look aside list.
    //

    ASSERT(IsListEmpty( &gSpyDeviceExtensionList ));

#ifndef MEMORY_DBG
//    ExDeleteNPagedLookasideList( &gFreeBufferList );
#endif

    //
    //  Free our FastIO table
    //

    fastIoDispatch = DriverObject->FastIoDispatch;
    DriverObject->FastIoDispatch = NULL;
    ExFreePoolWithTag( fastIoDispatch, FILESPY_POOL_TAG );

//    SPY_LOG_PRINT( SPYDEBUG_DISPLAY_ATTACHMENT_NAMES,
//                   ("FileSpy!DriverUnload:                        Unloading Complete (%p)\n",
//                    DriverObject) );
}

#endif

VOID
SpyFsNotification (
    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.

    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.

--*/
{
    PNAME_CONTROL devName;

    PAGED_CODE();

    //
    //  The DeviceObject passed in is always the base device object at this
    //  point because it is the file system's control device object.  We can
    //  just query this object's name directly.
    //

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产香蕉久久精品综合网| 欧美视频三区在线播放| 久久99这里只有精品| 国产成人综合视频| 欧美精品一二三区| 国产精品久99| 九色porny丨国产精品| 91久久精品一区二区| 久久精品无码一区二区三区| 亚洲一区二区五区| 99久久精品国产观看| 久久综合狠狠综合久久激情| 亚洲国产色一区| 91丝袜美腿高跟国产极品老师| 久久亚洲综合色一区二区三区| 制服丝袜中文字幕一区| 一区二区三区四区精品在线视频| 国产精品亚洲一区二区三区妖精| 69p69国产精品| 偷拍与自拍一区| 在线影院国内精品| 日韩毛片精品高清免费| 91精品国产综合久久婷婷香蕉 | 欧美亚洲图片小说| 亚洲国产高清在线| 国产精品香蕉一区二区三区| 日韩视频国产视频| 久久99精品国产.久久久久久| 欧美色国产精品| 亚洲大片一区二区三区| 在线观看日韩电影| 亚洲国产另类精品专区| 欧美三级三级三级| 亚洲成人精品影院| 欧美精品乱码久久久久久| 亚洲h在线观看| 看片网站欧美日韩| 久久亚洲一区二区三区四区| 国产乱子轮精品视频| 国产日韩欧美一区二区三区乱码 | 94-欧美-setu| 成人欧美一区二区三区黑人麻豆| 国产在线日韩欧美| 国产网红主播福利一区二区| 成熟亚洲日本毛茸茸凸凹| 中文字幕国产一区| 91福利国产精品| 日韩极品在线观看| 久久久激情视频| hitomi一区二区三区精品| 亚洲精品国产视频| 国产亚洲精久久久久久| 国产日韩高清在线| 91视频观看视频| 无码av中文一区二区三区桃花岛| 制服丝袜中文字幕亚洲| 国产一区二区三区久久久| 成人黄色网址在线观看| 亚洲人成精品久久久久久 | 香港成人在线视频| 日韩欧美国产三级| 不卡的av在线| 天天综合天天做天天综合| 亚洲成人精品在线观看| 97se亚洲国产综合在线| 另类中文字幕网| 亚洲欧美中日韩| 91麻豆精品91久久久久久清纯 | 久久久精品国产99久久精品芒果| 丁香网亚洲国际| 偷拍自拍另类欧美| 国产精品水嫩水嫩| 日韩一区二区免费电影| jizzjizzjizz欧美| 精品一二三四在线| 亚洲国产精品久久人人爱| 国产无一区二区| 欧美一级夜夜爽| 亚洲国产日韩综合久久精品| 国产午夜精品一区二区| 555夜色666亚洲国产免| 成人av网站在线观看免费| 精品国产一区二区亚洲人成毛片| 99re热这里只有精品免费视频| 欧美日韩国产首页| 一区二区三区加勒比av| 国产视频在线观看一区二区三区| 欧美日韩一级黄| 91美女蜜桃在线| 国产二区国产一区在线观看| 日韩成人av影视| 夜夜精品视频一区二区 | 国产传媒一区在线| 久久66热偷产精品| 天堂蜜桃一区二区三区 | 国产精品国产精品国产专区不片| 日韩欧美电影在线| 午夜精品福利一区二区蜜股av| 日本一区二区三区国色天香| 精品日韩在线观看| 日韩欧美电影在线| 欧美成人精品1314www| 欧美美女一区二区三区| 色噜噜狠狠色综合中国| 97久久精品人人爽人人爽蜜臀| 国产精品一品二品| 国产精品亚洲一区二区三区妖精| 久久精品99国产精品日本| 日韩黄色免费电影| 日韩国产欧美在线观看| 日韩影院精彩在线| 天天色综合成人网| 日韩成人精品在线| 高清国产一区二区| 精品国偷自产国产一区| 日韩视频一区在线观看| 日韩情涩欧美日韩视频| 精品国产一区二区三区忘忧草 | 欧美性猛片aaaaaaa做受| 在线精品视频小说1| 在线观看免费亚洲| 欧美精品高清视频| 日韩免费成人网| 久久奇米777| 日韩一区在线看| 亚洲一区二区三区四区中文字幕| 亚洲线精品一区二区三区| 亚洲成人av电影| 免费xxxx性欧美18vr| 激情综合色综合久久| 成人免费黄色大片| 91亚洲精品久久久蜜桃网站| 欧洲日韩一区二区三区| 欧美一区二区三区四区久久| 精品国精品国产| 中文av一区二区| 一区二区三区日韩在线观看| 三级不卡在线观看| 国内成人免费视频| 99精品国产91久久久久久 | 久久久.com| 一区二区三区自拍| 蜜臀av一区二区三区| 成人短视频下载 | 91久久线看在观草草青青| 精品在线你懂的| 99久久精品一区| 制服丝袜激情欧洲亚洲| 国产三级三级三级精品8ⅰ区| 日韩码欧中文字| 蓝色福利精品导航| 91论坛在线播放| 欧美不卡在线视频| 亚洲精品成人少妇| 国产一区二区影院| 欧美性生活大片视频| 久久精品一区二区三区不卡 | 97久久久精品综合88久久| 欧美一级在线视频| 亚洲免费大片在线观看| 久久国产精品99精品国产| 99久久精品免费看| 精品久久久久久久久久久久久久久| 国产精品毛片a∨一区二区三区| 亚洲成人你懂的| 国产传媒一区在线| 欧美大片在线观看| 亚洲一区二区3| 不卡的电影网站| 久久精品一区二区三区不卡| 天天色 色综合| 色婷婷综合激情| 国产精品理伦片| 久99久精品视频免费观看| 欧美视频一区二| 一二三区精品视频| 91蜜桃视频在线| 亚洲欧美在线观看| 成人午夜激情片| 久久精品人人做人人综合| 免费在线看成人av| 911国产精品| 丝袜美腿亚洲色图| 日韩黄色片在线观看| 欧美中文字幕不卡| 亚洲三级视频在线观看| 福利一区福利二区| 久久精品水蜜桃av综合天堂| 青娱乐精品在线视频| 欧美日韩视频专区在线播放| 亚洲欧洲综合另类在线| 99re视频精品| 一区二区三区四区蜜桃| 色菇凉天天综合网| 亚洲欧美一区二区三区孕妇| 97se亚洲国产综合自在线| 亚洲欧美综合网| 色国产综合视频| 亚洲三级在线免费观看| 成人性色生活片免费看爆迷你毛片|