Skip to content

Instantly share code, notes, and snippets.

@numinit
Last active Aug 13, 2022
Embed
What would you like to do?
#!/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