-
-
Save anonymous/5ca48c3f07b08f5b7974cfe4d086a5cf to your computer and use it in GitHub Desktop.
how to error?
This file contains 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
require 'open-uri' | |
def scan(site) | |
begin | |
source = open("http://".site).read | |
rescue | |
end | |
if (source =~ /generator" content="Joomla/) | |
puts site + " => \e[32mJoomla !\e[0m" | |
File.open("joomla.txt","a+") do |j| | |
j.puts"#{site}" | |
end | |
elsif(source =~ /wp-content/) | |
puts site + " => \e[31mWoordPress !\e[0m" | |
File.open("wp.txt","a+") do |w| | |
w.puts"#{site}" | |
end | |
elsif(source =~ /enerator" content="Drupal/) | |
puts site + " => \e[33mdrupal !\e[0m" | |
File.open("drupal.txt","a+") do |d| | |
d.puts"#{site}" | |
end | |
elsif(source =~ /generator" content="vBulletin/) | |
puts site + " => \e[35mvBulletin !\e[0m" | |
File.open("vb.txt","a+") do |v| | |
v.puts"#{site}" | |
end | |
else | |
puts site + " => \e[30mUnknown!\e[0m" | |
end | |
end | |
puts "\t+-------------------------+" | |
puts "\t| CMS Detection |" | |
puts "\t| my first script in ruby |" | |
puts "\t+-------------------------+" | |
puts "\n" | |
print "ur list of sites : " | |
list = gets.chomp | |
puts "\n" | |
arr = File.read(list).split() | |
arr.each do |x| | |
scan(x) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment