Skip to content

Instantly share code, notes, and snippets.

@raxoft
raxoft / mufs_password_decoder.rb
Last active July 4, 2024 11:19
This is the decoder of the password format used by the Amiga MultiUser filesytem. I wrote it the other day when I needed to login to an old A4000 whose root password I forgot. Note that some letters in the passwords are ambiguous due to modulo 53 being used, so 'A' and 'v' are the same, as is '0' and 'e' or space and 'U', so take your pick from …
# Decoder for passwords created by multiuser.library of Amiga MultiUser muFS filesystem (ACrypt() encoded, AKA AS225r2 format).
# Copyright (C) 2015 Patrik Rak (patrik@raxoft.cz)
# This source code is released under the MIT license.
def decode( password, user, base = 'A' )
r = 53
s = password.bytes.map{ |x| x - 'A'.ord } + [ 0 ] * 12