Simple file hiding

Posted by root Tue, 08 Jan 2008 07:45:00 GMT

irb console
$/ = "\r\n"

# addition of .mp3 file to .gif file
File.open('test.gif', 'a') do |fh| 
  fh << "\r\n#{File.readlines('test.mp3')}"
end

# extraction of the .mp3 content
File.open('extracted.mp3', 'w') do |fh| 
  fh << File.readlines('test.gif')[1..-1]
end

Posted in  | Tags  | no comments

Comments

Comments are disabled