import
os
import
re
import
sys
import
struct
log
=
open
(
"Bus数据.txt"
,
'r'
)
dogmem
=
open
(
'222.txt'
,
'w+'
)
inbuf
=
""
findok
=
0
inLen
=
0
table
=
{}
cmdnum
=
[]
dogcmdlist
=
[]
loglines
=
log.readlines()
for
line
in
loglines:
if
"CMD d1"
in
line:
print
(line[
34
:
39
])
dogcmd
=
line[
37
:
39
].upper()
if
dogcmd
in
cmdnum:
continue
else
:
cmdnum.append(dogcmd)
match dogcmd:
case
"02"
:
dogcmdlist.append(
"GetLimitTimes"
)
case
"03"
:
dogcmdlist.append(
"WriteHostKey"
)
case
"04"
:
dogcmdlist.append(
"WriteLimitTimes"
)
case
"05"
:
dogcmdlist.append(
"GetAlreadyTimes"
)
case
"06"
:
dogcmdlist.append(
"WriteYinZhi"
)
case
"07"
:
dogcmdlist.append(
"YT_ENCByPublic"
)
case
"08"
:
dogcmdlist.append(
"MakeCodeIni"
)
case
"0A"
:
dogcmdlist.append(
"MakeAuthCode"
)
case
"0B"
:
dogcmdlist.append(
"YT_EecCodeFun"
)
case
"0C"
:
dogcmdlist.append(
"EdcIni"
)
case
"0E"
:
dogcmdlist.append(
"Sub_GetRunTimer"
)
case
"10"
:
dogcmdlist.append(
"Ini_KeyByArray,Ini_Key,ReSet"
)
case
"12"
:
dogcmdlist.append(
"YtRead"
)
case
"13"
:
dogcmdlist.append(
"YtWrite"
)
case
"16"
: