Last active
November 22, 2017 11:21
-
-
Save r3k2/3aa0fb2af8d76ade2eed5d7eb45ee5a6 to your computer and use it in GitHub Desktop.
Brute force steganography passwords
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env ruby | |
# Hispgatos | |
# by ReK2, Fernandez Chris | |
# https://keybase.io/cfernandez | |
# Bruteforce password protected documents hidden inside images | |
# add you dictionary below to the dic variable | |
# of course you need to have installed steghide | |
require 'open3' | |
if ARGV.size > 1 | |
puts "to many arguments, enter just one image file name" | |
exit | |
elsif ARGV.size == 0 | |
puts "you need to add one image file as argument" | |
exit | |
end | |
image = ARGV[0] | |
dic = "rockyou.txt" | |
puts "about to bruteforce image: #{image}" | |
File.readlines("#{dic}").each do |line| | |
stdout_str, error_str, status = Open3.capture3("steghide extract -sf #{image} -p #{line}") | |
unless ! status.success? | |
puts "encontrado password: #{line}" | |
exit | |
else | |
#esto si se quiere ver el resultado | |
print "." | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment