Skip to content

Instantly share code, notes, and snippets.

@numinit
Last active August 13, 2022 09:09
Show Gist options
  • Save numinit/d8c32e0accee245ef291b8476b5ad4f9 to your computer and use it in GitHub Desktop.
Save numinit/d8c32e0accee245ef291b8476b5ad4f9 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# usage: $0 <badge ID, in hex or decimal> (this is the number on the Call Jenny screen)
# keygen by numinit
# gr33tz dc858; Distractions, Inc
# NixOS rules
raise ArgumentError, <<EOF if ARGV.empty?
usage: #$0 <badge ID, in hex or decimal> (this is the number on the Call Jenny screen)
Note that you have to enter the following on the Play screen first:
GED CDE GED
CDE GEG AEA
GED CGE DCD
EGE DCD EDE
GEG AEA BG#F#
EBG# F#
EOF
id = Integer(ARGV.first)
stuff = [
0xa5fa3b7f,
0xe35c2742,
0xbec5ca0f,
0x87e35d46,
0x5acd14f9,
0xabde1fcf
]
names = %w[
Alice Bob Carol Dan Eve Trevor
]
stuff.zip(names).each do |thing, name|
key = (thing ^ id).to_s(10).rjust(10, ?0).chars.rotate(-1).join
puts "Unlock for #{name} is: #{key}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment