Add {system encryptionkey}
This commit is contained in:
parent
89e61f669b
commit
9fdf3017f0
@ -17,6 +17,7 @@ Humax [system model] Fox T2 ([system hostname])
|
||||
Custom firmware version: $modver
|
||||
Web interface version: [system pkgver webif]
|
||||
Serial Number: [system serialno]
|
||||
Encryption Key: [system encryptionkey]
|
||||
Last Boot Reason: [system lastbootreason]
|
||||
"
|
||||
|
||||
|
@ -19,6 +19,9 @@ puts "<br>Humax Version: $fhtcpversion (kernel $kernelver)"
|
||||
puts "<br>Loader Version: [system loaderver]"
|
||||
puts "<br>System ID: [system systemid]"
|
||||
puts "<br>Serial Number: [system serialno]"
|
||||
if {$mws::pagetag eq "Diagnostics"} {
|
||||
puts "<br>Encryption Key: [system encryptionkey]"
|
||||
}
|
||||
puts "<br>Last Boot Reason: [system lastbootreason]"
|
||||
|
||||
puts "</span>"
|
||||
|
@ -144,6 +144,18 @@ proc {system serialno} {} {{serial ""}} {
|
||||
return $serial
|
||||
}
|
||||
|
||||
proc {system encryptionkey} {} {{key ""}} {
|
||||
if {$key ne ""} { return $key }
|
||||
set fd [open /dev/mtd3 r]
|
||||
$fd seek 0xc8c00
|
||||
set bytes [$fd read 6]
|
||||
$fd seek 0xcb800
|
||||
append bytes [$fd read 10]
|
||||
$fd close
|
||||
binary scan $bytes H* key
|
||||
return $key
|
||||
}
|
||||
|
||||
proc {system loaderver} {} {{ver ""}} {
|
||||
if {$ver ne ""} { return $ver }
|
||||
set fd [open /dev/mtd3 r]
|
||||
|
Loading…
Reference in New Issue
Block a user