Sha256: 07dc6c26b550906c87879ad26c0a8004e630ce159632a8d5b60a9837118f9a05

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

require 'spec_helper'

WECHALL = {
  'stegano1.bmp' => "Look what the hex-edit revealed: passwd:steganoI"
}

each_sample("wechall/*.bmp") do |fname|
  describe fname do
    subject{ cli(fname) }

    it { should include WECHALL[File.basename(fname)] }
  end
end

sample("wechall/5ZMGcCLxpcpsru03.png") do |fname|
  describe fname do
    it "extracts hidden image" do
      tname = "tmp/wechall.tmp.png"
      File.unlink(tname) if File.exist?(tname)
      cli(ZSteg::MaskCLI, fname, "--green 00000010 -O #{tname}")
      img1 = ZPNG::Image.load tname
      img2 = ZPNG::Image.load fname.sub(/\.png$/,".g00000010.png")
      img1.should == img2
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zsteg-0.0.1 spec/wechall_spec.rb