victor888 Posted June 23, 2009 Share Posted June 23, 2009 @ilko_tDo you have interest calcaulate the hash value by win CMD? Link to comment Share on other sites More sharing options...
ilko_t Posted June 23, 2009 Share Posted June 23, 2009 That would be perfect to be part of MkMigrateInf.cmd, can you help? Link to comment Share on other sites More sharing options...
victor888 Posted June 24, 2009 Share Posted June 24, 2009 This page (http://www.lammertbies.nl/comm/info/crc-calculation.html) maybe helpful.I have to say I got wrong CRC32 hash value of ILKO_T "USBSTOR\DISK&VEN_LEXAR&PROD_JD_LIGHTNING_II&REV_1100\AA04015900000158&0" whose CRC32 value is "BAA13B1F" not "16f722a4" Link to comment Share on other sites More sharing options...
ilko_t Posted June 24, 2009 Share Posted June 24, 2009 I am still not convinced that the hash is actually CRC32, plus the string must be converted to unicode.Look at the HASH_UNICODE_STRING macro posted above, it differs from any other macros I saw for creating CRC32 hash. Link to comment Share on other sites More sharing options...
victor888 Posted August 1, 2009 Share Posted August 1, 2009 I don't know how to turn it into unicode too. Link to comment Share on other sites More sharing options...
jaclaz Posted August 1, 2009 Share Posted August 1, 2009 (edited) About Unicode:Since the original text is "plain" it should be simply that "normal" text, with 00's as separators, see here:http://rishida.net/tools/conversion/Input in "Mixed Input"Check output as "Hexadecimal code points"But there are endless types of encding that can be called "UNICODE"....There are several CRC32 conventions:http://en.wikipedia.org/wiki/Cyclic_redund...putation_of_CRCNow which CRC-32 is used?And is it to be applied on a file containing the hex values? Or to what?And WHICH "Unicode" are we talking about?Using:http://www.codeproject.com/KB/recipes/reha...x?display=Printon a .txt file containing "plain" "USBSTOR\DISK&VEN_LEXAR&PROD_JD_LIGHTNING_II&REV_1100\AA04015900000158&0": 0001 0203 0405 0607 0809 0A0B 0C0D 0E0F - 0123456789ABCDEF----------------------------------------------------------------0x00: 5553 4253 544F 525C 4449 534B 2656 454E - USBSTOR\DISK&VEN0x10: 5F4C 4558 4152 2650 524F 445F 4A44 5F4C - _LEXAR&PROD_JD_L0x20: 4947 4854 4E49 4E47 5F49 4926 5245 565F - IGHTNING_II&REV_0x30: 3131 3030 5C41 4130 3430 3135 3930 3030 - 1100\AA0401590000x40: 3030 3135 3826 30 - 00158&0, I get: (rehash -none -crc32 originalascii.txt )CRC-32 : BAA13B1Fif I use this:http://www.autohotkey.com/forum/topic10796.htmlhttp://ringtail.its.monash.edu.au/pub/nihongo/uniconv.zipAs follows:uniconv ASCII originalascii.txt Unicode11:big-endian test.txtgetting a file in UNICODE as described before: 0001 0203 0405 0607 0809 0A0B 0C0D 0E0F - 0123456789ABCDEF----------------------------------------------------------------0x00: 0055 0053 0042 0053 0054 004F 0052 005C - .U.S.B.S.T.O.R.\0x10: 0044 0049 0053 004B 0026 0056 0045 004E - .D.I.S.K.&.V.E.N0x20: 005F 004C 0045 0058 0041 0052 0026 0050 - ._.L.E.X.A.R.&.P0x30: 0052 004F 0044 005F 004A 0044 005F 004C - .R.O.D._.J.D._.L0x40: 0049 0047 0048 0054 004E 0049 004E 0047 - .I.G.H.T.N.I.N.G0x50: 005F 0049 0049 0026 0052 0045 0056 005F - ._.I.I.&.R.E.V._0x60: 0031 0031 0030 0030 005C 0041 0041 0030 - .1.1.0.0.\.A.A.00x70: 0034 0030 0031 0035 0039 0030 0030 0030 - .4.0.1.5.9.0.0.00x80: 0030 0030 0031 0035 0038 0026 0030 - .0.0.1.5.8.&.0I get:CRC-32 : 28FD18C3If I do it via batch:@ECHO OFFECHO.>result.txtFOR %%A IN (Arabic ASCII big-endian Big5 BMP ChineseAutoDetectCNS-11643 CNS-11643-1986 cp1251 cp1252 cp437 cp850 cp932EBCDIC EBCDIK EUC-J EUC-KR GB2312 Greek Hebrew HZISO-2022-JP ISO-2022-KR ISOLatinCyrillic JapaneseAutoDetectJava JIS_X0201 JIS_X_0208 KoreanAutoDetect Latin1 Latin2Latin3 Latin4 Latin5 Latin6 little-endian Shift-JIS ThaiUCS2 Unicode11:big-endian Unicode11:BOM:big-endianUnicode11:BOM:Java Unicode11:BOM:little-endianUnicode11:BOM:UCS2 Unicode11:BOM:UTF7 Unicode11:BOM:UTF8Unicode11:Java Unicode11:little-endian Unicode11:UCS2Unicode11:UTF7 Unicode11:UTF8 Unicode20:BOM:JavaUnicode20:BOM:UTF7 Unicode20:BOM:UTF8 Unicode20:little-endianUnicode20:UCS2 UTF7 UTF8) DO (ECHO %%A>>result.txtuniconv ASCII originalascii.txt %%A test.txtrehash -none -crc32 test.txt>>result.txt)with ALL available formats in UNICONV, I cannot find ANYTHING similar to "16f722a4" NOT even changing:rehash -none -crc32 test.txt>>result.txtinto:rehash test.txt>>result.txt(i.e. using ALL hashing algorithms in rehash) jaclaz Edited August 1, 2009 by jaclaz Link to comment Share on other sites More sharing options...
ilko_t Posted August 2, 2009 Share Posted August 2, 2009 Try reading the code in post #90, that's the function, which produces the hash. I couldn't get a chance yet to attempt to understand it and create similar code in AutoIt for example.From what I understood in this matter, that function is far from any famous CRC32 calculation algorithm, even different than RtlComputeCrc32 function, which ReactOS uses and is present in NTDLL.DLL too.Attached is a program, made by someone else, while we tested hash calculation. 2k button uses Win 2K ParentID prefix hash calculation. It may become handy for someone.ParentIDPrefixGen.rar Link to comment Share on other sites More sharing options...
jaclaz Posted August 3, 2009 Share Posted August 3, 2009 Try reading the code in post #90, that's the function, which produces the hash.Yep. What I was trying indirectly to confirm is that the above hash calculation is NOT a CRC32 one:If there is anyone interested- here is the code in C, which calculates CRC32 hash:jaclaz Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now