├── README.org └── supermicro-ipmi-key /README.org: -------------------------------------------------------------------------------- 1 | * supermicro-ipmi-key 2 | 3 | This is a script to easily generate keys for the supermicro IPMI interface, based on [[https://peterkleissner.com/2018/05/27/reverse-engineering-supermicro-ipmi/][the documentation published by Peter Kleissner]]. 4 | 5 | To generate a key, simply take the MAC address from the IPMI card (case doesn't matter), pass it as argument to the script, and paste the resulting key piece by piece into the activation web form: 6 | 7 | #+BEGIN_SRC bash 8 | > supermicro-ipmi-key AA:BB:CC:DD:EE:FF 9 | 6f87 4348 6895 ae6d ab2d b1ce 10 | #+END_SRC 11 | 12 | For any technical details please read Peters article. 13 | -------------------------------------------------------------------------------- /supermicro-ipmi-key: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use strict; 4 | use Digest::SHA qw(hmac_sha1 hmac_sha1_hex); 5 | 6 | my $key="8544E3B47ECA58F9583043F8"; 7 | my $mac=$ARGV[0]; 8 | 9 | die "Usage: supermicro-ipmi-key " unless $mac; 10 | 11 | sub calculate_key { 12 | my ($data, $key) = map pack('H*', $_), @_; 13 | hmac_sha1_hex($data, $key); 14 | } 15 | 16 | if ($mac =~ /^([\da-zA-z][\da-zA-z]:){5}[\da-zA-z][\da-zA-z]$/ ){ 17 | $mac =~ s/://g; 18 | my $license_key = substr(calculate_key($mac, $key), 0, 24); 19 | for (my $i=0; $i<24; $i+=4){ 20 | print substr($license_key, $i, 4)." "; 21 | } 22 | print "\n"; 23 | } else { 24 | print "Invalid mac address: $mac\n"; 25 | } 26 | --------------------------------------------------------------------------------