Results 1 to 25 of 32
Thread: ParentIDPrefix-
Hybrid View
-
16th June 2009 00:26 #1Registered User
Join Date: Dec:2005
Location: yvr
Posts: 5,167
ParentIDPrefix-
http://reactos.freedoors.org/Reactos...npmgr/pnpmgr.c
, , ParentIdPrefix:
CRC32 . ?Code:... /* 2. Create the ParentIdPrefix value */ crc32 = RtlComputeCrc32(0, (PUCHAR)DeviceNode->Parent->InstancePath.Buffer, DeviceNode->Parent->InstancePath.Length); swprintf((PWSTR)ParentIdPrefixInformation->Data, L"%lx&%lx", DeviceNode->Parent->Level, crc32); RtlInitUnicodeString(&KeyValue, (PWSTR)ParentIdPrefixInformation->Data); ...
- Windows HKLM\SYSTEM\MountedDevices --> DosDevices .
:
ParentIDPrefix . USB , .\??\STORAGE#RemovableMedia#7&16f722a4&0&RM#{53f5630d-b6bf-11d0-94f2-00a0c91efb8b}
7 ParetnIDPrefix (USB) :
USB ParetnIDPrefix, XP/2003, ._??_USBSTOR#Disk&Ven_LEXAR&Prod_JD_LIGHT NING_II&Rev_1100#AA04015900000158&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
:
http://www.msfn.org/board/index.php?...c=131770&st=60
:
http://scissec.scis.ecu.edu.au/confe...Windows_XP.pdf
cdob ReactOS, XP/2003.Last edited by ilko; 16th June 2009 at 00:32.
-
16th June 2009 03:41 #2
. ParentIDPrefix, XP/2003, , ? , , . , .
, , DEVICE_NODE:
http://www.nirsoft.net/kernel_struct...VICE_NODE.html
InstancePath ( ), WinObj. , , -.
RtlComputeCrc32:
http://source.winehq.org/source/dlls/ntdll/rtl.c
, e InstancePath. , .
. ParentIDPrefix .
crc32 KeyValue( UNICODE_STRING), . .
- device-tree, . - ?Last edited by Bombera; 16th June 2009 at 04:16.
EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
16th June 2009 09:38 #3Registered User
Join Date: Dec:2005
Location: yvr
Posts: 5,167
.. ParentIDPrefix, XP/2003
, , Vista/7, ParentIDPrefix .... , ?
MountedDevices migrate.inf, XP/2003 setup U: USB , MountedDevices. XP/2003 .ParentIDPrefix .
MountedDevices Vista/7, ParentIDPrefix XP/2003 migrate.inf.
Vista/7 migrate.inf, XP/2003. , ParentIDPrefix, , CRC32 ( ) .
MkMigrateInf3.cmd migrate.inf.
H: USB , U: .Code:MkMigrateInf3.cmd H: migrate.inf
-
16th June 2009 10:14 #4
CRC32 ZIP. match- CRC- device:
bruteforce search - , .Code:#!/usr/bin/python import binascii, readline s = "" while True: s = raw_input() print "%x" % (int(binascii.crc32(s.strip())) & 0xffffffff)

:
\Registry\Machine\System\CurrentControlS et\Enum\XXX
XXX InstancePath, . , USBSTOR, google
Last edited by anrieff; 16th June 2009 at 10:24.
, . .
"640K ught to be enough for anybody" - Bill Gates, 1981
::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel
-
16th June 2009 21:57 #5Registered User
Join Date: Oct:2003
Location:
Posts: 4,317
, Windows 2000? . , ParentID.
MS .
-
16th June 2009 23:56 #6
, bsb,

, , reverse engineer-. CRC32- , breakpoint ..., . .
"640K ught to be enough for anybody" - Bill Gates, 1981
::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel
-
16th June 2009 23:56 #7Registered User
Join Date: Dec:2005
Location: yvr
Posts: 5,167
, anrief.
ReactOS , USB , .
-
17th June 2009 00:41 #8
. , - ( ). WMI, - . , , ParentIDPrefix . , , .
, .
Device Tree , , ( .- , ) .
ParentIDPrefix, - Instance path .EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
17th June 2009 01:36 #9Registered User
Join Date: Dec:2005
Location: yvr
Posts: 5,167
Bombera, 15-20%

, .
---------- 01:36 ---------- 01:15 ----------
:
, ?Code:USBSTOR#Disk&Ven_LEXAR&Prod_JD_LIGHTNING_II&Rev_1100#AA04015900000158&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
http://crc32-checksum.waraxe.us/
, "16f722a4".Last edited by ilko; 17th June 2009 at 01:42.
-
17th June 2009 12:31 #10
, . .
Python 2.6. python.exe- path- cmd
( )Code:python crc32.py
( copy-paste), CRC.
, - CRC, , 8- , UNICODE, . CRC- (8bit i unicode)
: :
Code:#!/usr/bin/python import binascii s = "" while True: try: s = raw_input() except EOFError: break s = s.strip() hs = binascii.hexlify(s) ds_be = "" ds_le = "" for i in xrange(0, len(hs), 2): ds_be += "00" + hs[i:i+2] ds_le += hs[i:i+2] + "00" print "8-bit string CRC32: %x" % (int(binascii.crc32(binascii.unhexlify(hs))) & 0xffffffff) print "16-bit LE string CRC32: %x" % (int(binascii.crc32(binascii.unhexlify(ds_le))) & 0xffffffff) print "16-bit BE string CRC32: %x" % (int(binascii.crc32(binascii.unhexlify(ds_be))) & 0xffffffff)
Last edited by anrieff; 17th June 2009 at 12:42. Reason:
, . .
"640K ught to be enough for anybody" - Bill Gates, 1981
::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel
-
17th June 2009 01:55 #11
. RtlComputeCrc32 , UNICODE_STRING, (Buffer) (Length). InstancePath DEVICE_NODE . DeviceNode , e DEVICE_NODE , Parent e , , - UNICODE_STRING , InstancePath DEVICE_NODE .
. RtlComputeCrc32 ( ) .
, swprintf, DeviceNode->Parent->Level - ( - PCI Bus-a, ACPI, USB Bus Controller-a?). , , - crc2, RtlComputeCrc32.
swprintf, KeyValue, UNICODE_STRING ( UNICODE_STRING . , ).
- InstancePath . , . , .
Windows Managment Inteface, , , , ( Win32_Bus, Win32_DeviceBus).
, , , USB , , . , , , - (IoCallDriver).
-( !, ) , " "
anrieff , , .
P.S. ParentIDPrefix. ?
Last edited by Bombera; 17th June 2009 at 02:09.
EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
17th June 2009 03:39 #12Registered User
Join Date: Dec:2005
Location: yvr
Posts: 5,167
, .
.
, , USB mass storage device, - Vid&Pid ( /7).
InstancePath :
USBSTOR#Disk&Ven_LEXAR&Prod_JD_LIGHTNING _II&Rev_1100
USBSTOR , Disk , Ven&Prod&Rev . , Vista/7.
- , USB HKLM\SYSTEM\MountedDevices , 7:
ParentIDPrefix.Code:_??_USBSTOR#Disk&Ven_LEXAR&Prod_JD_LIGHT NING_II&Rev_1100#AA04015900000158&0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
, migrate.inf ParentIDPrefix , / Text mode USB . / USB , , InstancePath .
---------- 03:39 ---------- 02:46 ----------
?
.Code:lkd> !devnode 0 1 Dumping IopRootDeviceNode (= 0x8a366c98) ... DevNode 0x8a349610 for PDO 0x8a395e50 InstancePath is "PCI\VEN_8086&DEV_2658&SUBSYS_01881028&REV_03\3&61aaa01&0&E8" ServiceName is "usbuhci" State = DeviceNodeStarted (0x308) Previous State = DeviceNodeEnumerateCompletion (0x30d) DevNode 0x89290568 for PDO 0x8a252030 InstancePath is "USB\Vid_05dc&Pid_a640\AA04015900000158" ServiceName is "USBSTOR" State = DeviceNodeStarted (0x308) Previous State = DeviceNodeEnumerateCompletion (0x30d) DevNode 0x89298530 for PDO 0x892d4ea0 InstancePath is "USBSTOR\Disk&Ven_LEXAR&Prod_JD_LIGHTNING_II&Rev_1100\AA04015900000158&0" ServiceName is "disk" State = DeviceNodeStarted (0x308) Previous State = DeviceNodeEnumerateCompletion (0x30d) DevNode 0x89504230 for PDO 0x892898e8 InstancePath is "STORAGE\RemovableMedia\7&16f722a4&1&RM" ServiceName is "hotcore3" TargetDeviceNotify List - f 0xe25f3808 b 0xe25f3808 State = DeviceNodeStarted (0x308) Previous State = DeviceNodeEnumerateCompletion (0x30d)
:
-
18th June 2009 23:45 #13
ParentIDPrefix-, . ? Win2K ReactOS. & . 2, , ( - -).
InstancePath , ( - , 9) . . ? 2 crc32, a ReactOS . .
ParentIDPrefix.
2, . ReactOS, RtlComputeCrc32 WINE. ReactOS, RtlComputeCrc32 XP.
, 2. .
?
Enum, anrieff - . -, InstancePath ( 90% ).
, .

, .
Visual Studio 2005, Release. , 2.EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
19th June 2009 01:07 #14Registered User
Join Date: Dec:2005
Location: yvr
Posts: 5,167




, :
PD level 7 2, :Code:USBSTOR\Disk&Ven_LEXAR&Prod_JD_LIGHTNING_II&Rev_1100\AA04015900000158&0
USBSTOR .Code:7&16f722a4
Disk&Ven_LEXAR&Prod_JD_LIGHTNING_II&Rev_ 1100 Vid&Pid&Rev Vista/7.
AA04015900000158 , Vista/7 .
7- PD level - USB , USB card reader 8, 7. , 2.
AA04015900000158&0 - (AA04015900000158).
, Windows ( ), , .
0 .
, UPPERCASE- .
Vista/7 , , , , Vista/7.
, Vista/7 :
. AutoIt .Code:5F,00,3F,00,3F,00,5F,00,55,00,53,00,42,00,53,00,54,00,4F,00,52,00,23,00,44,00,69,00,73,00,6B,00,26,00,56,00,65,00,6E,00,5F,00,4C,00,45,00,58,00,41,00,52,00,26,00,50,00,72,00,6F,00,64,00,5F,00,4A,00,44,00,5F,00,4C,00,49,00,47,00,48,00,54,00,4E,00,49,00,4E,00,47,00,5F,00,49,00,49,00,26,00,52,00,65,00,76,00,5F,00,31,00,31,00,30,00,30,00,23,00,41,00,41,00,30,00,34,00,30,00,31,00,35,00,39,00,30,00,30,00,30,00,30,00,30,00,31,00,35,00,38,00,26,00,30,00,23,00,7B,00,35,00,33,00,66,00,35,00,36,00,33,00,30,00,37,00,2D,00,62,00,36,00,62,00,66,00,2D,00,31,00,31,00,64,00,30,00,2D,00,39,00,34,00,66,00,32,00,2D,00,30,00,30,00,61,00,30,00,63,00,39,00,31,00,65,00,66,00,62,00,38,00,62,00,7D,00
ReactOS , bsb .
@anrieff

copy-paste"16f722a4". , 2K CRC32 , .Code:USBSTOR\Disk&Ven_LEXAR&Prod_JD_LIGHTNING_II&Rev_1100\AA04015900000158&0
, ParentIDPrefix 2K:
http://bbs.driverdevelop.com/htm_dat...508/96099.html
, ?
Code:HASH_UNICODE_STRING(&valueName, &Hash);
Last edited by ilko; 19th June 2009 at 01:17.
-
19th June 2009 01:20 #15
, , Paged -(. , ). , crc32 2 ( pnpirp.c):
UNICODE_STRING, ULONG( 32- . DWORD).Code:#define HASH_UNICODE_STRING( _pustr, _phash ) { \ PWCHAR _p = (_pustr)->Buffer; \ PWCHAR _ep = _p + ((_pustr)->Length/sizeof(WCHAR)); \ ULONG _chHolder =0; \ \ while( _p < _ep ) { \ _chHolder = 37 * _chHolder + (unsigned int) (*_p++); \ } \ \ *(_phash) = abs(314159269 * _chHolder) % 1000000007; \ }
RtlComputeCrc32 :
http://source.winehq.org/source/dlls/ntdll/rtl.c ,
. . , . , XP 2 , . - . 2 . , ?
, , .
P.S. , 2 , Uppercase ParentID(
). , .
Last edited by Bombera; 19th June 2009 at 01:38.
EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
21st October 2009 07:11 #16
-
19th June 2009 01:31 #17Registered User
Join Date: Dec:2005
Location: yvr
Posts: 5,167
,

AutoIt. , .
XP 2, 2 .
Originally Posted by Bombera
Last edited by ilko; 19th June 2009 at 01:56.
-
21st October 2009 11:04 #18Registered User
Join Date: Oct:2003
Location:
Posts: 4,317
_pustr. (cast) unsigned int. 37*chHolder. chHolder. .
.
phash .
-
21st October 2009 21:17 #19
, , 37- 2^32, 0 65535 0 36. ( 10^8) ,
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
22nd October 2009 08:25 #20
10^8 ( ), 2^32-1 - 0xffff ffff, . 314159269 .
_pustr Buffer Length - .
_p .
end pointer , .
JanBird , wchar_t, windows 2 . :
<morning-nonsense>_chHolder = 37 * _chHolder + (unsigned int) (*_p++);
( unsigned int win32 32 ), 2 (.. ).
</morning-nonsense>Last edited by Oldman; 22nd October 2009 at 13:19.
.
-
22nd October 2009 09:49 #21Registered User
Join Date: Feb:2006
Location: Plovdiv
Posts: 392
windows wchar_t, ASCII .JanBird , wchar_t, windows 2 . :
:_chHolder = 37 * _chHolder + (unsigned int) (*_p++);
( unsigned int win32 32 ), 2 (.. ).
-
22nd October 2009 10:07 #22
-
22nd October 2009 11:56 #23Registered User
Join Date: Feb:2006
Location: Plovdiv
Posts: 392
:
Code:#include "math.h" #include "string.h" template<class T> unsigned long Hash(T *p) { unsigned long _chHolder = 0; while( *p) _chHolder = 37 * _chHolder + (unsigned long) (*p++); return abs(314159269 * (long)_chHolder) % 1000000007; } int main() { char a[] = "USBSTOR\\Disk&Ven_LEXAR&Prod_JD_LIGHTNING_II&Rev_1100\\AA04015900000158&0"; wchar_t b[] = L"USBSTOR\\Disk&Ven_LEXAR&Prod_JD_LIGHTNING_II&Rev_1100\\AA04015900000158&0"; auto resultA = Hash(strupr(a)); auto resultB = Hash(_wcsupr(b)); return 0; }
-
22nd October 2009 12:03 #24Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

-
21st October 2009 22:36 #25Registered User
Join Date: Dec:2005
Location: yvr
Posts: 5,167
_pustr USBSTOR\Disk&Ven_LEXAR&Prod_JD_LIGHTNING _II&Rev_1100\AA04015900000158&0 .
_p ?
Code:PWCHAR _p = (_pustr)->Buffer;
_ep ?Code:PWCHAR _ep = _p + ((_pustr)->Length/sizeof(WCHAR));
C , :
_phash 314159269 * _chHolder, "%" 1 2 (1000000007) ,Code:_chHolder = 37 * _chHolder + (unsigned int) (*_p++);

?Code:*(_phash) = abs(314159269 * _chHolder) % 1000000007;
, 7 , "ULONG _chHolder =0;"




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in