HexTool.exe下载- @echo off
- setlocal enabledelayedexpansion
-
- set "file1=01.txt"
- set "file2=basetik.tik"
-
- for /f "tokens=1-2 delims=:" %%i in ('type "%file1%"') do (
- if /i "%%i" == "Using title id" (
- set "HexNum1=%%j"
- ) else if /i "%%i" == "generated encrypted" (
- set "HexNum2=%%j"
- )
- )
-
- set "tmp1=%HexNum1: =%"
- set "tmp2=%HexNum2: =%"
- for %%i in (256, 128, 64, 32, 16, 8, 4, 2, 1) do (
- if "!tmp1:~%%i!" NEQ "" (set "tmp1=!tmp1:~%%i!" & set /a Len1 += %%i)
- if "!tmp2:~%%i!" NEQ "" (set "tmp2=!tmp2:~%%i!" & set /a Len2 += %%i)
- )
-
- set /a "offSet1=0x01DC, offSet2=0x01BF, Len1=(Len1+1)/2, Len2=(Len2+1)/2"
-
- HexTool "%file2%" %offSet1% %Len1% %HexNum1%
- HexTool "%file2%" %offSet2% %Len2% %HexNum2%
- pause
复制代码
|