本帖最后由 tiandyoin 于 2024-12-24 10:01 编辑
想用 findstr 找出注册表的 hex(2) 值,自己研究一夜的式子,但未能适用所有情况:- rem 把 '\"' 双引号加反斜杠去掉
- set "$=!line:\"=!"
- rem 查找 形式如 @=hex(2):... 或 ""=hex(2):.. 或 "..."=hex(2):
- cd.&echo;!$!!$!| >nul findstr /i/r /c:"^[ ]*@[ ]*=[ ]*hex(2):" /c:"^[ ]*\""[^\"]*\""[ ]*=[ ]*hex^(2^):"
复制代码 用例:- [HKEY_CURRENT_USER\tiandyoin\test18]
- @=hex(2):25,00,30,00,24,00,00,00
- ""=hex(2):25,00,30,00,24,00,00,00
- "@"=hex(2):25,00,30,00,24,00,\
- 00,00
- "normal"=hex(2):25,00,30,00,24,00,00,00
- "hello world"=hex(2):25,00,30,00,24,00,00,00
- "\""=hex(2):25,00,30,00,24,00,00,00
- "\"abc\""=hex(2):25,00,30,00,24,00,00,\
- 00
- "hello world\\\\\\\""=hex(2):25,00,30,00,24,00,00,00
- "A \\B \\ C\\"=hex(2):00,00
- "A=\"B"=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,00,00
- "A=\"=hex(2):"=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,00,00
复制代码
|