Module: Snackhack2
- Defined in:
- lib/snackhack2/ssrf.rb,
lib/snackhack2.rb,
lib/snackhack2/SSL.rb,
lib/snackhack2/dns.rb,
lib/snackhack2/drupal.rb,
lib/snackhack2/emails.rb,
lib/snackhack2/robots.rb,
lib/snackhack2/tomcat.rb,
lib/snackhack2/sitemap.rb,
lib/snackhack2/version.rb,
lib/snackhack2/comments.rb,
lib/snackhack2/iplookup.rb,
lib/snackhack2/portscan.rb,
lib/snackhack2/sshbrute.rb,
lib/snackhack2/wordpress.rb,
lib/snackhack2/bypass_403.rb,
lib/snackhack2/list_users.rb,
lib/snackhack2/subdomains.rb,
lib/snackhack2/screenshots.rb,
lib/snackhack2/subdomains2.rb,
lib/snackhack2/WP_Symposium.rb,
lib/snackhack2/phone_number.rb,
lib/snackhack2/website_meta.rb,
lib/snackhack2/wpForo_Forum.rb,
lib/snackhack2/CVE-2017-9841.rb,
lib/snackhack2/bannergrabber.rb,
lib/snackhack2/phishing_tlds.rb,
lib/snackhack2/reverse_shell.rb,
lib/snackhack2/website_links.rb,
lib/snackhack2/Honeywell_PM43.rb,
lib/snackhack2/forward_remote.rb,
lib/snackhack2/cryptoextractor.rb,
lib/snackhack2/google_analytics.rb,
lib/snackhack2/webserver_log_cleaner.rb,
lib/snackhack2/indirect_command_injection.rb
Overview
Process.spawn(“ruby -run -ehttpd . -p8008”) sleep 10
Defined Under Namespace
Classes: BannerGrabber, BypassHTTP, CVE20179841, CommandInjection, Comments, CryptoExtractWebsite, Dns, Drupal, Email, GoogleAnalytics, HoneywellPM43, IpLookup, ListUsers, PhishingData, PhishingTlds, PhoneNumber, PortScan, ReverseShell, Robots, SSHBute, SSHForwardRemote, SSLCert, SSRF, ScreenShot, SiteMap, Subdomains, Subdomains2, TomCat, WPForoForum, WPSymposium, WebServerCleaner, WebsiteLinks, WebsiteMeta, WordPress
Constant Summary
collapse
- UA =
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36'
- VERSION =
'0.6.8'
Class Method Summary
collapse
Class Method Details
.clean_portscan ⇒ Object
83
84
85
86
87
88
|
# File 'lib/snackhack2.rb', line 83
def self.clean_portscan
Dir['*_port_scan.txt'].each do |file|
puts "[+] deleting #{file}..."
File.delete(file)
end
end
|
.clean_serverversion ⇒ Object
55
56
57
58
59
60
61
62
63
64
|
# File 'lib/snackhack2.rb', line 55
def self.clean_serverversion
Dir['*.txt'].each do |file|
if file.include?('_serverversion')
puts "[+] deleting #{file}..."
File.delete(file)
end
end
end
|
.file_save(site, type, content, ip: false, host: true) ⇒ Object
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/snackhack2.rb', line 66
def self.file_save(site, type, content, ip: false, host: true)
if host
hostname = URI.parse(site).host
File.open("#{hostname}_#{type}.txt", 'w+') { |file| file.write(content) }
puts "[+] Saving file to #{hostname}_#{type}.txt..."
else
File.open("#{site}_#{type}.txt", 'w+') { |file| file.write(content) }
puts "[+] Saving file to #{site}_#{type}.txt..."
end
end
|
.get(site) ⇒ Object
79
80
81
|
# File 'lib/snackhack2.rb', line 79
def self.get(site)
HTTParty.get(site, { headers: { 'User-Agent' => UA } })
end
|
.read_emails ⇒ Object
89
90
91
92
93
94
95
96
97
98
99
|
# File 'lib/snackhack2.rb', line 89
def self.read_emails
email_filter = []
Dir['*_emails.txt'].each do |file|
File.readlines(file).each do |k|
domain = k.split(".")[1].strip
unless domain.eql?("png")
puts k
end
end
end
end
|
.read_portscan ⇒ Object
100
101
102
103
104
105
106
|
# File 'lib/snackhack2.rb', line 100
def self.read_portscan
files = Dir['*_port_scan.txt']
files.each do |f|
read = File.read(f)
puts "#{f.split('_')[0]}: #{read}"
end
end
|
.read_serverversion ⇒ Object
47
48
49
50
51
52
53
|
# File 'lib/snackhack2.rb', line 47
def self.read_serverversion
files = Dir['*.txt']
files.each do |f|
read = File.read(f)
puts "#{f.split('_')[0]}: #{read}"
end
end
|