Skip to content

Instantly share code, notes, and snippets.

@oddevan
Created May 28, 2014 00:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oddevan/a66c6e3b42e39302edae to your computer and use it in GitHub Desktop.
Save oddevan/a66c6e3b42e39302edae to your computer and use it in GitHub Desktop.
A simple ruby script to pull blocks of 74 bytes of data from a binary file. It just so happens that a Mii takes up 74 bytes of data in the library.
io = File.open('RFL_DB.dat')
io.read(4) #Burn the first 4 bytes
(1..100).each do |k|
mii = io.read(74)
break unless mii;
IO.binwrite("#{k}.miigx", mii);
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment