diff --git a/bin/version b/bin/version index 6980d5b2..30bf6dcd 100755 --- a/bin/version +++ b/bin/version @@ -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] " diff --git a/webif/include/modversion.jim b/webif/include/modversion.jim index 3b4ebb96..85c7493d 100755 --- a/webif/include/modversion.jim +++ b/webif/include/modversion.jim @@ -19,6 +19,9 @@ puts "
Humax Version: $fhtcpversion (kernel $kernelver)" puts "
Loader Version: [system loaderver]" puts "
System ID: [system systemid]" puts "
Serial Number: [system serialno]" +if {$mws::pagetag eq "Diagnostics"} { + puts "
Encryption Key: [system encryptionkey]" +} puts "
Last Boot Reason: [system lastbootreason]" puts "" diff --git a/webif/lib/system.class b/webif/lib/system.class index 25fafe59..df583af7 100644 --- a/webif/lib/system.class +++ b/webif/lib/system.class @@ -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]