productkey try

This commit is contained in:
Cadey Ratio 2016-02-09 17:30:30 -08:00
parent 5085b81777
commit 5094c9e36d
2 changed files with 18 additions and 1 deletions

View File

@ -1 +0,0 @@
: |> license -out hackmii |> LICENSE

18
src/productkey.nim Normal file
View File

@ -0,0 +1,18 @@
import os, posix, streams, strutils
const fileName = "/sys/firmware/acpi/tables/MSDM"
if getuid() != 0:
quit "run me as root"
if not fileName.existsFile:
quit "System has no product key"
var
fin = fileName.newFileStream fmRead
discard fin.readAll
let keyData = fin.readAll
echo keyData