Apple checks a certain devicekey while booting, so that key is an anti-circumvention techniques. Any use of that string in a form where apple's software may read it is probably a violation of the DMCA. This script uses that string[1] in order to circumvent apple's checks, and thus is legally dubious at best.
There are numerous other likely DMCA violations as well, from copying GUIDs with the intent to circumvent checks to downloading copyrighted material from apple's servers which they only give you license to download for an actual mac machine.
[0]: https://en.wikipedia.org/wiki/Psystar_Corporation#Legal_issu...
[1]: https://github.com/myspaghetti/macos-virtualbox/blob/44a21f7...