Install outguess on OS X Lion with Homebrew

Posted on

In my security and cryptography class, My teacher showed me an interesting program called outguess. What it does it hide a plain text into a jpg file. This method is known as steganography.

The program will read an input text file and slightly change pixels color in the image in such the way that it is not going to be visible.

Here is an example of putting some text into an image:

outguess -d some_text.txt image.jpg image_result.jpg

Here is how to extract text from the image:

outguess -r image_result.jpg hidden_text.txt

Here is how to install outguess with homebrew. Firstly, we need to create a formula.

brew create http://www.outguess.org/outguess-0.2.tar.gz
brew edit outguess

Then, modify the outguess formula like this

require 'formula'

class Outguess < Formula
  homepage 'http://www.outguess.org/'
  url 'http://www.outguess.org/outguess-0.2.tar.gz'
  mirror 'http://www.mirrors.wiretapped.net/security/steganography/outguess/outguess-0.2.tar.gz'
  md5 '321f23dc0badaba4350fa66b59829064'

  def install

    # Segmentation fault occurs if compiling with clang, use llvm-gcc instead
    ENV.gcc :force => true

    args = ["--disable-debug",
            "--disable-dependency-tracking",
            "--prefix=#{prefix}",
            "--sysconfdir=#{etc}",
            "--mandir=#{man}"
            ]

    system "./configure", *args
    system "make"

    bin.install "outguess"
    man1.install "outguess.1"
  end
end

And that's it. In order to install:

brew install outguess

I actually pull-requested to homebrew main repository. However, the maintainers don't want a formula that is not clang compatible because llvm-gcc is going away. I agreed with them. Even though there is a successor of llvm-gcc, DragonEgg, we still don't know its future and keeping clang-incompatible formula away from main repository make the repository clean. If I have time, I think I will take a look at the source code and creating a patch. Noteing that this program seems to be no longer maintained.