m4dh4v45b1n 0.2.0 → 0.2.1

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: 6e6280209d2b172f88c5e8f0c505cb2f2b5a91c6184ff6b942d7482e1634ab52
4
- data.tar.gz: 1a5b08e7c6faa78e56194cc40c356fded1063ff1f64835f5866391b6bfccb080
3
+ metadata.gz: d107d63e79ef59d8957cb5a94a2290677878c7cbb6d192f3d8c1e9ea64d585d0
4
+ data.tar.gz: c77d52fcaa868add88145c8ded8499b5e8cd08f47efba739b8e1206616f46def
5
5
  SHA512:
6
- metadata.gz: cb1531739ae7dbedb1d444ce64a0ac9e7d5098438154c12297189cd510da93e97d62c67a00aa2fd084b20cf1693205a0680ff53ca92f114aa15dfb96c3a8d83c
7
- data.tar.gz: 789511ad0a0f8c3ea6f660947d63154933f50218524830ad175e6a53f733bb50ad0baee227560cedf312465f168910f79beafc70108ac177859633953967b27a
6
+ metadata.gz: e26f510fcabafa28c0744264126605080cebe11ca6a490a4466ca39c4e1497b288165df8ea322da2c69e43b47fd13911de0f4b83a38b51ba3d591dce6e256ce4
7
+ data.tar.gz: 77260ee7b72604fdbb9726597e2a18d48c55b49b2c88b09202cc2b0e0978ea2e62885e41f09db3eb2b9bf4d25a9cfb32ec6f622fa135ddab76b25a5246d0ef6a
File without changes
File without changes
data/bin/fuzz-web-dir.rb CHANGED
File without changes
data/bin/m4dh4v45b1n.rb CHANGED
File without changes
@@ -1,3 +1,5 @@
1
+ #!/bin/env ruby
2
+
1
3
  require 'sdcd'
2
4
  require 'digest'
3
5
  require 'net/http'
@@ -29,16 +31,39 @@ URLS = [
29
31
  "SDCD",
30
32
  "@",
31
33
  ","
34
+ ],
35
+ [
36
+ "https://raw.githubusercontent.com/cyb3r-mafia/subdomains/main/assets4/<SDCD>.sdcd",
37
+ "URL",
38
+ "SHA1",
39
+ "SDCD",
40
+ "@",
41
+ ","
42
+ ],
43
+ [
44
+ "https://raw.githubusercontent.com/cyb3r-mafia/subdomains/main/assets5/<SDCD>.sdcd",
45
+ "URL",
46
+ "SHA1",
47
+ "SDCD",
48
+ "@",
49
+ ","
50
+ ],
51
+ [
52
+ "https://raw.githubusercontent.com/cyb3r-mafia/subdomains/main/assets6/<SDCD>.sdcd",
53
+ "URL",
54
+ "SHA1",
55
+ "SDCD",
56
+ "@",
57
+ ","
32
58
  ]
33
59
  ]
34
60
 
35
61
  SORCE_DEPTH = 1
36
- SDCD_DIR = []
37
62
  CONFIG_FILE = ENV["HOME"] + "/.s-pasive.conf"
38
63
 
39
64
  tmp = []
40
-
41
-
65
+ tmp2 = []
66
+ src = ''
42
67
 
43
68
 
44
69
  if !File.exist? CONFIG_FILE
@@ -58,7 +83,16 @@ if File.exist? CONFIG_FILE
58
83
  File.open(CONFIG_FILE, "r") do |f|
59
84
  f.readlines.map do |l|
60
85
  if !l.start_with? "#"
61
- tmp.append(l.chop.split(" "))
86
+ val = l.chop.split(" ")
87
+ if val[1] == "URL"
88
+ tmp.append(val)
89
+ src += "\e[34;1m🌐 #{val[0]}\e[0m\n"
90
+ elsif val[1] == "DIR"
91
+ src += "\e[34;1m #{val[0]}\e[0m\n"
92
+ tmp2.append(val)
93
+ else
94
+ src += "\e[31;1m✘ #{l}\e[0m\n"
95
+ end
62
96
  end
63
97
  end
64
98
  end
@@ -67,6 +101,8 @@ else
67
101
  end
68
102
 
69
103
  SDCD_URL_DIR = tmp
104
+ SDCD_DIR = tmp2
105
+ SRC = src
70
106
 
71
107
  class ReconSubdomain
72
108
 
@@ -96,33 +132,32 @@ class ReconSubdomain
96
132
  @sdcd_dir.map do |templet|
97
133
  if @source_depth != 0
98
134
  if templet[-3] == "SDCD" and templet[1] == "DIR"
99
- hash = hashit(templet[-4], @domain)
100
- end
101
- @depth.times do |d|
102
- if d > 0
103
- hash = hashit(templet[-4], @domain + d.to_s)
104
- end
105
- path = templet[0].gsub("<SDCD>", hash)
106
- puts "\e[34;1m[] #{path}\e[0m"
107
- if File.exist? path
108
- puts "\n\e[32m[+] Data Found at depth\e[0m #{d}.\n\n"
109
- sdcd_dict = SDCD::new.read(path)
110
- sdcd_dict[@domain].map do |us_data|
111
- ips,sdomain = us_data.split(templet[-2])
112
- if !@notin.include? sdomain
113
- @notin.append(sdomain)
114
- puts "[+] \e[36;1m#{sdomain}\e[0m |\e[2;1m#{ips.gsub(templet[-1],"\e[0m|\e[2;1m")}\e[0m|"
115
- if !@out.nil?
116
- File.open(@out, "a") do |l|
117
- l.write(sdomain + "\n")
135
+ hash = hashit(templet[-4], @domain)
136
+ @depth.times do |d|
137
+ if d > 0
138
+ hash = hashit(templet[-4], @domain + d.to_s)
139
+ end
140
+ path = templet[0].gsub("<SDCD>", hash)
141
+ if File.exist? path
142
+ puts "\n\e[32m[+] Data Found at depth\e[0m #{d}.\n\n"
143
+ sdcd_dict = SDCD::new.read(path)
144
+ sdcd_dict[@domain].map do |us_data|
145
+ ips,sdomain = us_data.split(templet[-2])
146
+ if !@notin.include? sdomain
147
+ @notin.append(sdomain)
148
+ puts "[\e[32;1m+\e[0m] \e[36;1m#{sdomain}\e[0m |\e[2;1m#{ips.gsub(templet[-1],"\e[0m|\e[2;1m")}\e[0m|"
149
+ if !@out.nil?
150
+ File.open(@out, "a") do |l|
151
+ l.write(sdomain + "\n")
152
+ end
118
153
  end
119
154
  end
155
+ if @max_res == @notin.length
156
+ exit
157
+ end
120
158
  end
121
- if @max_res == @notin.length
122
- exit
123
- end
159
+ @source_depth -= 1
124
160
  end
125
- @source_depth -= 1
126
161
  end
127
162
  end
128
163
  end
@@ -145,7 +180,6 @@ class ReconSubdomain
145
180
  hash = hashit(templet[-4], @domain + d.to_s)
146
181
  end
147
182
  url = templet[0].gsub("<SDCD>", hash)
148
- puts "\e[1;34m[•] #{url}\e[0m"
149
183
  req = Net::HTTP::get_response(URI url)
150
184
  if req.code == '200'
151
185
  puts "\n\e[32m[+] Data Found at depth\e[0m #{d}.\n\n"
@@ -154,7 +188,7 @@ class ReconSubdomain
154
188
  ips,sdomain = us_data.split(templet[-2])
155
189
  if !@notin.include? sdomain
156
190
  @notin.append(sdomain)
157
- puts "[+] \e[36;1m#{sdomain}\e[0m |\e[2;1m#{ips.gsub(templet[-1],"\e[0m|\e[2;1m")}\e[0m|"
191
+ puts "[\e[32;1m+\e[0m] \e[36;1m#{sdomain}\e[0m |\e[2;1m#{ips.gsub(templet[-1],"\e[0m|\e[2;1m")}\e[0m|"
158
192
  if !@out.nil?
159
193
  File.open(@out, "a") do |l|
160
194
  l.write(sdomain + "\n")
@@ -211,6 +245,7 @@ willing to read my code. :) (#{VERSION})\n\n"
211
245
  init.domain = ARGV[-1]
212
246
  end
213
247
  if !init.domain.nil?
248
+ puts SRC
214
249
  init.scan
215
250
  else
216
251
  puts "Usage: recon-passive-subdomain.rb [ARG] DOMAIN\n use --help for more info."
@@ -1,2 +1,2 @@
1
1
  # frozen_string_literal: true
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: m4dh4v45b1n
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Madhava-mng
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-27 00:00:00.000000000 Z
11
+ date: 2021-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sdcd