snackhack2 0.6.7 → 0.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f24d3c225a7262763bb360b50b139af3d73222abfa7288d1149f5f47a7c837e4
4
- data.tar.gz: 90f9e49687132acd4930f01ce2d03bd98b1911301d81f26130e253461f94d5a5
3
+ metadata.gz: 0ebd87b5313f0ca67abbb146beb1990b448c4dbe073afbb46122440d35849063
4
+ data.tar.gz: 9ae6115bbe6a97494dab6dfd02acf854abcd4c9acd6b605b3de35103497fd767
5
5
  SHA512:
6
- metadata.gz: 5c535c224366a2ad8a2ebcb047d47c4157d1fad3a3aa30b782decd5b2291823cd1b0b91043bfd60ab21f3d9c40b66c47e4e85957fb784cd6a0209b3117c6cfa5
7
- data.tar.gz: 97232dc976b82e3a677d87fda6ea3319fc6ddc09526657d731bf89701b8ccaf70f84b4215977b17cdb7fb2ac05e6143aebf7791ce0488b88e5a0ca5cd7f14e22
6
+ metadata.gz: ae1dcbd9a7f7f43f74d37ca079ea24c0693eabd5b8bd0bf5467801341bb50dff9e7fc28a70a4795d45af2d5c3c847578560a7ee86f199edc26d7c35bef50deba
7
+ data.tar.gz: a5a50dd46b6b9870caba17892f620f42212ecada0cb430700184c004b8da2e39d50dbd760049e0a742636495cae3d261c5669e04faf5134913111b489956d428
@@ -0,0 +1,23 @@
1
+ require 'net/http'
2
+ require 'openssl'
3
+ module Snackhack2
4
+ class SSLCert
5
+ attr_accessor :site
6
+
7
+ def initialize
8
+ @site = site
9
+ end
10
+ def get_cert
11
+ begin
12
+ if @site.downcase.include?("https://")
13
+ @site = @site.downcase.gsub("https://", "")
14
+ end
15
+ uri = URI::HTTPS.build(host: @site)
16
+ response = Net::HTTP.start(uri.host, uri.port, :use_ssl => true)
17
+ cert = response.peer_cert
18
+ puts cert.serial
19
+ rescue OpenSSL::SSL::SSLError,Net::OpenTimeout, Errno::EHOSTUNREACH
20
+ end
21
+ end
22
+ end
23
+ end
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: true
1
+ # frozen_string_literal: true
2
2
  require 'socket'
3
3
  module Snackhack2
4
4
  class BannerGrabber
@@ -19,13 +19,12 @@ module Snackhack2
19
19
  drupal_score = 0
20
20
  d = Snackhack2.get(@site)
21
21
  if d.code == 200
22
- d.headers.each do |k|
23
- drupal_score += 10 if k.include?('drupal')
22
+ d.headers.each do |k,v|
23
+ drupal_score += 10 if k.downcase.include?('drupal')
24
+ drupal_score += 10 if v.downcase.include?('drupal')
24
25
  end
25
26
  end
26
- d.headers.each do |v|
27
- drupal_score += 10 if v.include?('drupal')
28
- end
27
+
29
28
  doc = Nokogiri::HTML(URI.open(@site))
30
29
  posts = doc.xpath('//meta')
31
30
  posts.each do |l|
@@ -6,7 +6,7 @@ module Snackhack2
6
6
  class Email
7
7
  attr_accessor :max_depth
8
8
 
9
- def initialize(site, save_file: true, max_depth: 4)
9
+ def initialize(site, save_file: true, max_depth: 2)
10
10
  @site = site
11
11
  @save_file = save_file
12
12
  @max_depth = max_depth
@@ -167,8 +167,6 @@ class PhishingTlds < PhishingData
167
167
  letters_with_more_than_one << key
168
168
  end
169
169
  end
170
-
171
-
172
170
  ds = remove_tlds
173
171
  new_ds = ds.shift
174
172
 
@@ -184,15 +182,7 @@ class PhishingTlds < PhishingData
184
182
  # removes ALL chracters ( l )
185
183
  remove_letters_out << new_ds.gsub(l, "")
186
184
  end
187
- # add tldds to the created list
188
- domains_with_tlds = add_tlds(remove_letters_out)
189
- if array_out
190
- domains_with_tlds
191
- else
192
- # will print the contents of the array
193
- # instead of returning the array
194
- domains_with_tlds.each { |a| puts a }
195
- end
185
+ add_tlds(remove_letters_out)
196
186
  end
197
187
  def add_tlds(list)
198
188
  # takes the newly created domains (list)
@@ -9,8 +9,9 @@ module Snackhack2
9
9
  def initialize
10
10
  @site = site
11
11
  end
12
-
13
- def ssrf
12
+ def port_scan
13
+ end
14
+ def ssrf_google
14
15
  url = @site.gsub('SSRF', 'http://google.com')
15
16
  ht = HTTParty.get(url)
16
17
  if ht.body.include?("Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Snackhack2
4
- VERSION = '0.6.7'
4
+ VERSION = '0.6.8'
5
5
  end
data/lib/snackhack2.rb CHANGED
@@ -86,7 +86,17 @@ module Snackhack2
86
86
  File.delete(file)
87
87
  end
88
88
  end
89
-
89
+ def self.read_emails
90
+ email_filter = []
91
+ Dir['*_emails.txt'].each do |file|
92
+ File.readlines(file).each do |k|
93
+ domain = k.split(".")[1].strip
94
+ unless domain.eql?("png")
95
+ puts k
96
+ end
97
+ end
98
+ end
99
+ end
90
100
  def self.read_portscan
91
101
  files = Dir['*_port_scan.txt']
92
102
  files.each do |f|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snackhack2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7
4
+ version: 0.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - mike
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-10-26 00:00:00.000000000 Z
11
+ date: 2025-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -76,6 +76,7 @@ files:
76
76
  - lib/snackhack2.rb
77
77
  - lib/snackhack2/CVE-2017-9841.rb
78
78
  - lib/snackhack2/Honeywell_PM43.rb
79
+ - lib/snackhack2/SSL.rb
79
80
  - lib/snackhack2/WP_Symposium.rb
80
81
  - lib/snackhack2/bannergrabber.rb
81
82
  - lib/snackhack2/bypass_403.rb
@@ -99,7 +100,6 @@ files:
99
100
  - lib/snackhack2/robots.rb
100
101
  - lib/snackhack2/screenshots.rb
101
102
  - lib/snackhack2/sitemap.rb
102
- - lib/snackhack2/ssh.rb
103
103
  - lib/snackhack2/sshbrute.rb
104
104
  - lib/snackhack2/ssrf.rb
105
105
  - lib/snackhack2/subdomains.rb
@@ -1,15 +0,0 @@
1
- require 'socket'
2
-
3
- # Grab the banner of a given +ip+ address and +port+
4
- # to attempt to connect to.
5
- #
6
- # @param ip [String] Target IP address.
7
- # @param port [Integer] Target port.
8
- #
9
- # @return [String]
10
- def grab_banner(ip, port)
11
- TCPSocket.new(ip, port).recv(1024)
12
- end
13
-
14
- # Print the result of the method to STDOUT.
15
- puts grab_banner('100.106.14.40', 22)