- @Echo off&Mode con cols=80 lines=26&setlocal EnableDelayedExpansion&color a&Title 修改任意文件的HEX [-☆Ver: 1.1 -☆ By_ 凌枫工作组 Q群:35962310 ☆-]
- chcp 437>nul&graftabl 936>nul
-
- rem 调用方法:
- rem call :修改HEX "100 FFFF" "第一要替换的数值+,+第二个要替换的数值+,+三+,+四+,+....+,+第N个" "要把第一个替换为的数值+,+要把第二个替换为的数值+,+三+,+四+,+....+,+第N个" "要修改的文件的路径"
-
- rem 比如 破解 XP SP3 的TCPIP连接数,由原来的 10 破解为 512:
-
- rem 下面调用的参数的意思是:
- rem 将 %windir%\system32\drivers\tcpip.sys 文件里
- rem 数值为 05 00 0A 00 00 00 的地方 修改为:05 00 00 02 00 00
- rem 数值为 6B ED 05 00 01 00 的地方 修改为:6E EF 05 00 01 00
-
-
- call :修改HEX "100 FFFF" "05 00 0A 00 00 00+,+6B ED 05 00 01 00" "05 00 00 02 00 00+,+6E EF 05 00 01 00" "%windir%\system32\drivers\tcpip.sys"
- exit
-
- :修改HEX
- for %%p in ("!tmp!\Blocks") do md %%p 2>nul&set BkTmpP=%%~p
- if not exist !BkTmpP!\1 (
- set CutF_V=!tmp!\CutFile.vbs
- (
- Echo iCutSize = 1024 * 64
- Echo With CreateObject^("Adodb.Stream"^)
- Echo .Open
- Echo .Type = 1
- Echo .LoadFromFile^("%~4" ^)
- Echo iBlocks = .Size / iCutSize
- Echo If iBlocks ^<^> Fix^(iBlocks^) Then iBlocks = iBlocks+1
- Echo Set S = CreateObject^("Adodb.Stream"^)
- Echo For i = 1 To iBlocks
- Echo .Position = ^(i - 1^) * iCutSize
- Echo S.Type = 1
- Echo S.Mode = 3
- Echo S.Open
- Echo .CopyTo S, iCutSize
- Echo S.SaveToFile "!BkTmpP!\" ^& i, 2
- Echo S.Close
- Echo Next
- Echo .Close
- Echo End With
- )>!CutF_V!
- wscript.exe /b !CutF_V!
- )
- set V_2=%2&set V_2=!V_2:+="!
- set V_3=%3&set V_3=!V_3:+="!
- FOR %%a in (!V_2!) do (
- set /a Var1=!Var1!+1&set Var2=
- FOR %%A in (!V_3!) do (
- set /a Var2=!Var2!+1
- if "!Var1!"=="!Var2!" for /f %%Y in ('dir "!BkTmpP!\*" /b /o:n') do for /f "tokens=*" %%Z in ('Echo exit^|cmd/kprompt $_S %~1 %%~a $_Q^|debug !BkTmpP!\%%Y^|find ":"') do Echo exit|cmd/kprompt $_S %~1 %%~a $_E %%Z %%~A $_W $_Q|debug !BkTmpP!\%%Y >nul
- )
- )
- set Files=&for /f %%F in ('dir "!BkTmpP!\*" /b /o:n') do set Files=!Files!+"!BkTmpP!\%%F"/b
- copy /y !Files:~1! "已修改_%~n4%~x4" >nul
- Del /f /s /q "!BkTmpP!\*.*" >nul
- goto :eof
复制代码
|