-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathscan.rb
59 lines (49 loc) · 1.11 KB
/
scan.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
require 'open-uri'
=begin
Coded by Mr.MaGnoM
first script in ruby is just test
magsec.blogspot.com
fb.com/mr.magnom2
=end
def scan(site)
begin
source = open(site).read
rescue
end
if (source =~ /generator" content="Joomla/)
puts site + " => \e[32mJoomla !\e[0m"
File.open("joomla.html","a+") do |j|
j.puts"#{site}<br>"
end
elsif(source =~ /generator" content="WordPress/)
puts site + " => \e[31mWoordPress !\e[0m"
File.open("wp.html","a+") do |w|
w.puts"#{site}<br>"
end
elsif(source =~ /enerator" content="Drupal/)
puts site + " => \e[33mdrupal !\e[0m"
File.open("drupal.html","a+") do |d|
d.puts"#{site}<br>"
end
elsif(source =~ /generator" content="vBulletin/)
puts site + " => \e[35mvBulletin !\e[0m"
File.open("vb.html","a+") do |v|
v.puts"#{site}<br>"
end
else
puts site + " => \e[30mUnknown!\e[0m"
end
end
puts "\t+-------------------------+"
puts "\t| CMS Detection |"
puts "\t| Coded by Mr.MaGnoM |"
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