ronin-recon 0.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +7 -0
  2. data/.document +4 -0
  3. data/.github/workflows/ruby.yml +46 -0
  4. data/.gitignore +20 -0
  5. data/.rspec +1 -0
  6. data/.rubocop.yml +44 -0
  7. data/.ruby-version +1 -0
  8. data/.yardopts +1 -0
  9. data/COPYING.txt +165 -0
  10. data/ChangeLog.md +36 -0
  11. data/Gemfile +62 -0
  12. data/README.md +391 -0
  13. data/Rakefile +74 -0
  14. data/bin/ronin-recon +16 -0
  15. data/data/completions/ronin-recon +95 -0
  16. data/data/templates/worker.rb.erb +67 -0
  17. data/data/wordlists/raft-small-directories.txt.gz +0 -0
  18. data/data/wordlists/subdomains-1000.txt.gz +0 -0
  19. data/examples/recon.rb +24 -0
  20. data/gemspec.yml +57 -0
  21. data/lib/ronin/recon/builtin/dns/lookup.rb +65 -0
  22. data/lib/ronin/recon/builtin/dns/mailservers.rb +64 -0
  23. data/lib/ronin/recon/builtin/dns/nameservers.rb +61 -0
  24. data/lib/ronin/recon/builtin/dns/reverse_lookup.rb +63 -0
  25. data/lib/ronin/recon/builtin/dns/srv_enum.rb +178 -0
  26. data/lib/ronin/recon/builtin/dns/subdomain_enum.rb +105 -0
  27. data/lib/ronin/recon/builtin/dns/suffix_enum.rb +168 -0
  28. data/lib/ronin/recon/builtin/net/ip_range_enum.rb +65 -0
  29. data/lib/ronin/recon/builtin/net/port_scan.rb +84 -0
  30. data/lib/ronin/recon/builtin/net/service_id.rb +75 -0
  31. data/lib/ronin/recon/builtin/ssl/cert_enum.rb +109 -0
  32. data/lib/ronin/recon/builtin/ssl/cert_grab.rb +76 -0
  33. data/lib/ronin/recon/builtin/ssl/cert_sh.rb +77 -0
  34. data/lib/ronin/recon/builtin/web/dir_enum.rb +121 -0
  35. data/lib/ronin/recon/builtin/web/email_addresses.rb +70 -0
  36. data/lib/ronin/recon/builtin/web/spider.rb +93 -0
  37. data/lib/ronin/recon/builtin.rb +34 -0
  38. data/lib/ronin/recon/cli/command.rb +40 -0
  39. data/lib/ronin/recon/cli/commands/completion.rb +61 -0
  40. data/lib/ronin/recon/cli/commands/irb.rb +57 -0
  41. data/lib/ronin/recon/cli/commands/new.rb +203 -0
  42. data/lib/ronin/recon/cli/commands/run.rb +420 -0
  43. data/lib/ronin/recon/cli/commands/test.rb +99 -0
  44. data/lib/ronin/recon/cli/commands/worker.rb +114 -0
  45. data/lib/ronin/recon/cli/commands/workers.rb +80 -0
  46. data/lib/ronin/recon/cli/debug_option.rb +45 -0
  47. data/lib/ronin/recon/cli/printing.rb +122 -0
  48. data/lib/ronin/recon/cli/ruby_shell.rb +51 -0
  49. data/lib/ronin/recon/cli/worker_command.rb +105 -0
  50. data/lib/ronin/recon/cli.rb +50 -0
  51. data/lib/ronin/recon/config.rb +371 -0
  52. data/lib/ronin/recon/dns_worker.rb +41 -0
  53. data/lib/ronin/recon/engine.rb +639 -0
  54. data/lib/ronin/recon/exceptions.rb +45 -0
  55. data/lib/ronin/recon/graph.rb +127 -0
  56. data/lib/ronin/recon/importer.rb +224 -0
  57. data/lib/ronin/recon/input_file.rb +81 -0
  58. data/lib/ronin/recon/message/job_completed.rb +60 -0
  59. data/lib/ronin/recon/message/job_failed.rb +69 -0
  60. data/lib/ronin/recon/message/job_started.rb +60 -0
  61. data/lib/ronin/recon/message/shutdown.rb +38 -0
  62. data/lib/ronin/recon/message/value.rb +76 -0
  63. data/lib/ronin/recon/message/worker_started.rb +51 -0
  64. data/lib/ronin/recon/message/worker_stopped.rb +51 -0
  65. data/lib/ronin/recon/mixins/dns.rb +639 -0
  66. data/lib/ronin/recon/mixins/http.rb +58 -0
  67. data/lib/ronin/recon/mixins.rb +21 -0
  68. data/lib/ronin/recon/output_formats/dir.rb +94 -0
  69. data/lib/ronin/recon/output_formats/dot.rb +155 -0
  70. data/lib/ronin/recon/output_formats/graph_format.rb +48 -0
  71. data/lib/ronin/recon/output_formats/graphviz_format.rb +115 -0
  72. data/lib/ronin/recon/output_formats/pdf.rb +43 -0
  73. data/lib/ronin/recon/output_formats/png.rb +43 -0
  74. data/lib/ronin/recon/output_formats/svg.rb +43 -0
  75. data/lib/ronin/recon/output_formats.rb +48 -0
  76. data/lib/ronin/recon/registry.rb +35 -0
  77. data/lib/ronin/recon/root.rb +33 -0
  78. data/lib/ronin/recon/scope.rb +112 -0
  79. data/lib/ronin/recon/value/parser.rb +113 -0
  80. data/lib/ronin/recon/value.rb +110 -0
  81. data/lib/ronin/recon/value_status.rb +87 -0
  82. data/lib/ronin/recon/values/cert.rb +168 -0
  83. data/lib/ronin/recon/values/domain.rb +88 -0
  84. data/lib/ronin/recon/values/email_address.rb +114 -0
  85. data/lib/ronin/recon/values/host.rb +137 -0
  86. data/lib/ronin/recon/values/ip.rb +123 -0
  87. data/lib/ronin/recon/values/ip_range.rb +155 -0
  88. data/lib/ronin/recon/values/mailserver.rb +61 -0
  89. data/lib/ronin/recon/values/nameserver.rb +61 -0
  90. data/lib/ronin/recon/values/open_port.rb +190 -0
  91. data/lib/ronin/recon/values/url.rb +218 -0
  92. data/lib/ronin/recon/values/website.rb +200 -0
  93. data/lib/ronin/recon/values/wildcard.rb +140 -0
  94. data/lib/ronin/recon/values.rb +32 -0
  95. data/lib/ronin/recon/version.rb +26 -0
  96. data/lib/ronin/recon/web_worker.rb +35 -0
  97. data/lib/ronin/recon/worker.rb +433 -0
  98. data/lib/ronin/recon/worker_pool.rb +203 -0
  99. data/lib/ronin/recon/workers.rb +260 -0
  100. data/lib/ronin/recon.rb +22 -0
  101. data/man/ronin-recon-completion.1 +76 -0
  102. data/man/ronin-recon-completion.1.md +78 -0
  103. data/man/ronin-recon-irb.1 +27 -0
  104. data/man/ronin-recon-irb.1.md +26 -0
  105. data/man/ronin-recon-new.1 +58 -0
  106. data/man/ronin-recon-new.1.md +59 -0
  107. data/man/ronin-recon-run.1 +137 -0
  108. data/man/ronin-recon-run.1.md +115 -0
  109. data/man/ronin-recon-test.1 +53 -0
  110. data/man/ronin-recon-test.1.md +55 -0
  111. data/man/ronin-recon-worker.1 +32 -0
  112. data/man/ronin-recon-worker.1.md +34 -0
  113. data/man/ronin-recon-workers.1 +29 -0
  114. data/man/ronin-recon-workers.1.md +31 -0
  115. data/man/ronin-recon.1 +57 -0
  116. data/man/ronin-recon.1.md +57 -0
  117. data/ronin-recon.gemspec +62 -0
  118. data/scripts/setup +58 -0
  119. metadata +364 -0
@@ -0,0 +1,94 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ronin-recon - A micro-framework and tool for performing reconnaissance.
4
+ #
5
+ # Copyright (c) 2023-2024 Hal Brodigan (postmodern.mod3@gmail.com)
6
+ #
7
+ # ronin-recon is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published
9
+ # by the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # ronin-recon is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with ronin-recon. If not, see <https://www.gnu.org/licenses/>.
19
+ #
20
+
21
+ require 'ronin/core/output_formats/output_dir'
22
+ require 'ronin/recon/values'
23
+
24
+ require 'set'
25
+
26
+ module Ronin
27
+ module Recon
28
+ module OutputFormats
29
+ #
30
+ # Represents an output directory.
31
+ #
32
+ class Dir < Core::OutputFormats::OutputDir
33
+
34
+ # The opened filenames and files within the output directory.
35
+ #
36
+ # @return [Hash{Class<Values::Value> => File}]
37
+ attr_reader :files
38
+
39
+ # Mapping of value classes to file names.
40
+ VALUE_FILE_NAMES = {
41
+ Values::Domain => 'domains.txt',
42
+ Values::Mailserver => 'mailservers.txt',
43
+ Values::Nameserver => 'nameservers.txt',
44
+ Values::Host => 'hosts.txt',
45
+ Values::Wildcard => 'wildcards.txt',
46
+ Values::IP => 'ips.txt',
47
+ Values::IPRange => 'ip_ranges.txt',
48
+ Values::OpenPort => 'open_ports.txt',
49
+ Values::Cert => 'certs.txt',
50
+ Values::EmailAddress => 'email_addresses.txt',
51
+ Values::URL => 'urls.txt',
52
+ Values::Website => 'websites.txt'
53
+ }
54
+
55
+ #
56
+ # Initializes the list output format.
57
+ #
58
+ # @param [String] path
59
+ # The output file path.
60
+ #
61
+ def initialize(path)
62
+ super(path)
63
+
64
+ @files = VALUE_FILE_NAMES.transform_values do |file_name|
65
+ File.open(File.join(@path,file_name),'w')
66
+ end
67
+ end
68
+
69
+ #
70
+ # Writes a new value to it's specific file.
71
+ #
72
+ # @param [Values::Value] value
73
+ # The value to write.
74
+ #
75
+ def <<(value)
76
+ file = @files.fetch(value.class) do
77
+ raise(NotImplementedError,"unsupported value class: #{value.inspect}")
78
+ end
79
+
80
+ file.puts(value)
81
+ file.flush
82
+ end
83
+
84
+ #
85
+ # Closes the output files.
86
+ #
87
+ def close
88
+ @files.each_value(&:close)
89
+ end
90
+
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,155 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ronin-recon - A micro-framework and tool for performing reconnaissance.
4
+ #
5
+ # Copyright (c) 2023-2024 Hal Brodigan (postmodern.mod3@gmail.com)
6
+ #
7
+ # ronin-recon is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published
9
+ # by the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # ronin-recon is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with ronin-recon. If not, see <https://www.gnu.org/licenses/>.
19
+ #
20
+
21
+ require 'ronin/core/output_formats/output_file'
22
+ require 'ronin/recon/output_formats/graph_format'
23
+ require 'ronin/recon/values/domain'
24
+ require 'ronin/recon/values/mailserver'
25
+ require 'ronin/recon/values/nameserver'
26
+ require 'ronin/recon/values/host'
27
+ require 'ronin/recon/values/ip'
28
+ require 'ronin/recon/values/ip_range'
29
+ require 'ronin/recon/values/open_port'
30
+ require 'ronin/recon/values/email_address'
31
+ require 'ronin/recon/values/cert'
32
+ require 'ronin/recon/values/url'
33
+ require 'ronin/recon/values/website'
34
+ require 'ronin/recon/values/wildcard'
35
+
36
+ require 'set'
37
+
38
+ module Ronin
39
+ module Recon
40
+ module OutputFormats
41
+ #
42
+ # Represents a GraphViz DOT (`.dot`) output format.
43
+ #
44
+ class Dot < Core::OutputFormats::OutputFile
45
+
46
+ include GraphFormat
47
+
48
+ #
49
+ # Initializes the GraphViz DOT (`.dot`) output format.
50
+ #
51
+ # @param [IO] io
52
+ # The output stream to write to.
53
+ #
54
+ def initialize(io)
55
+ super(io)
56
+
57
+ @io.puts "digraph {"
58
+ end
59
+
60
+ #
61
+ # Returns the descriptive type name for the value object.
62
+ #
63
+ # @param [Values::Value] value
64
+ # The value object.
65
+ #
66
+ # @return [String]
67
+ # The type name for the value object.
68
+ #
69
+ # @raise [NotImplementedError]
70
+ # The given value object was not supported.
71
+ #
72
+ def value_type(value)
73
+ case value
74
+ when Values::Domain then "Domain"
75
+ when Values::Mailserver then "Mailserver"
76
+ when Values::Nameserver then "Nameserver"
77
+ when Values::Host then "Host"
78
+ when Values::IP then "IP address"
79
+ when Values::IPRange then "IP range"
80
+ when Values::OpenPort then "Open #{value.protocol.upcase} Port"
81
+ when Values::EmailAddress then "Email Address"
82
+ when Values::Cert then "SSL/TLS Cert"
83
+ when Values::URL then "URL"
84
+ when Values::Website then "Website"
85
+ when Values::Wildcard then "Wildcard"
86
+ else
87
+ raise(NotImplementedError,"value class #{value.class} not supported")
88
+ end
89
+ end
90
+
91
+ #
92
+ # Returns the body text for the value object.
93
+ #
94
+ # @param [Values::Value] value
95
+ # The value object.
96
+ #
97
+ # @return [String]
98
+ # The body text for the value object.
99
+ #
100
+ def value_text(value)
101
+ case value
102
+ when Values::URL
103
+ "#{value.status} #{value}"
104
+ when Values::Cert
105
+ value.subject.to_h.map { |k,v| "#{k}: #{v}\n" }.join
106
+ else
107
+ value.to_s
108
+ end
109
+ end
110
+
111
+ #
112
+ # Writes a value to the GraphViz DOT output stream as a node
113
+ # declaration.
114
+ #
115
+ # @param [Values::Value] value
116
+ # The value object to write.
117
+ #
118
+ def <<(value)
119
+ name = value.to_s
120
+ label = "#{value_type(value)}\n#{value_text(value)}"
121
+
122
+ @io.puts "\t#{name.inspect} [label=#{label.inspect}]"
123
+ @io.flush
124
+ end
125
+
126
+ #
127
+ # Appends a value and it's parent value to the GraphViz DOT output
128
+ # stream.
129
+ #
130
+ # @param [Values::Value] value
131
+ # The value to append.
132
+ #
133
+ # @param [Values::Value] parent
134
+ # The parent value of the given value.
135
+ #
136
+ # @return [self]
137
+ #
138
+ def []=(value,parent)
139
+ @io.puts "\t#{parent.to_s.inspect} -> #{value.to_s.inspect}"
140
+ @io.flush
141
+ end
142
+
143
+ #
144
+ # Writes the complete JSON Array of values and closes the IO stream.
145
+ #
146
+ def close
147
+ @io.puts "}"
148
+
149
+ super
150
+ end
151
+
152
+ end
153
+ end
154
+ end
155
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ronin-recon - A micro-framework and tool for performing reconnaissance.
4
+ #
5
+ # Copyright (c) 2023-2024 Hal Brodigan (postmodern.mod3@gmail.com)
6
+ #
7
+ # ronin-recon is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published
9
+ # by the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # ronin-recon is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with ronin-recon. If not, see <https://www.gnu.org/licenses/>.
19
+ #
20
+
21
+ module Ronin
22
+ module Recon
23
+ module OutputFormats
24
+ #
25
+ # Indicates that an output format can contain graph information.
26
+ #
27
+ module GraphFormat
28
+ #
29
+ # Appends a value and it's parent value to the GraphViz DOT output
30
+ # stream.
31
+ #
32
+ # @param [Values::Value] value
33
+ # The value to append.
34
+ #
35
+ # @param [Values::Value] parent
36
+ # The parent value of the given value.
37
+ #
38
+ # @return [self]
39
+ #
40
+ # @abstract
41
+ #
42
+ def []=(value,parent)
43
+ raise(NotImplementedError,"#{self.class}#[]= was not implemented")
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,115 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ronin-recon - A micro-framework and tool for performing reconnaissance.
4
+ #
5
+ # Copyright (c) 2023-2024 Hal Brodigan (postmodern.mod3@gmail.com)
6
+ #
7
+ # ronin-recon is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published
9
+ # by the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # ronin-recon is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with ronin-recon. If not, see <https://www.gnu.org/licenses/>.
19
+ #
20
+
21
+ require 'ronin/core/output_formats/output_file'
22
+ require 'ronin/recon/output_formats/graph_format'
23
+ require 'ronin/recon/output_formats/dot'
24
+
25
+ require 'tempfile'
26
+
27
+ module Ronin
28
+ module Recon
29
+ module OutputFormats
30
+ #
31
+ # Represents a GraphViz output format.
32
+ #
33
+ class GraphvizFormat < Core::OutputFormats::OutputFile
34
+
35
+ include GraphFormat
36
+
37
+ # The `.dot` output file.
38
+ #
39
+ # @return [Tempfile]
40
+ attr_reader :dot_file
41
+
42
+ # The DOT output format.
43
+ #
44
+ # @return [Dot]
45
+ attr_reader :dot_output
46
+
47
+ #
48
+ # Initializes the GraphViz output format.
49
+ #
50
+ # @param [IO] io
51
+ # The output stream to write to.
52
+ #
53
+ def initialize(io)
54
+ super(io)
55
+
56
+ @dot_file = Tempfile.new(['ronin-recon',"#{format}"])
57
+ @dot_output = Dot.new(@dot_file)
58
+ end
59
+
60
+ #
61
+ # The desired GraphViz output format.
62
+ #
63
+ # @return [Symbol]
64
+ # The output format name.
65
+ #
66
+ # @abstract
67
+ #
68
+ def format
69
+ raise(NotImplementedError,"#{self.class}#format was not defined!")
70
+ end
71
+
72
+ #
73
+ # Writes a value to the GraphViz output stream as a node declaration.
74
+ #
75
+ # @param [Values::Value] value
76
+ # The value object to write.
77
+ #
78
+ def <<(value)
79
+ @dot_output << value
80
+ end
81
+
82
+ #
83
+ # Appends a value and it's parent value to the GraphViz output stream.
84
+ #
85
+ # @param [Values::Value] value
86
+ # The value to append.
87
+ #
88
+ # @param [Values::Value] parent
89
+ # The parent value of the given value.
90
+ #
91
+ # @return [self]
92
+ #
93
+ def []=(value,parent)
94
+ @dot_output[value] = parent
95
+ return self
96
+ end
97
+
98
+ #
99
+ # Closes and generates the GraphViz output file.
100
+ #
101
+ def close
102
+ @dot_output.close
103
+
104
+ IO.popen(['dot',"-T#{format}",@dot_file.path]) do |dot_io|
105
+ # relay the `dot` output to the output stream.
106
+ @io.write(dot_io.readpartial(4096)) until dot_io.eof?
107
+ end
108
+
109
+ super
110
+ end
111
+
112
+ end
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ronin-recon - A micro-framework and tool for performing reconnaissance.
4
+ #
5
+ # Copyright (c) 2023-2024 Hal Brodigan (postmodern.mod3@gmail.com)
6
+ #
7
+ # ronin-recon is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published
9
+ # by the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # ronin-recon is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with ronin-recon. If not, see <https://www.gnu.org/licenses/>.
19
+ #
20
+
21
+ require 'ronin/recon/output_formats/graphviz_format'
22
+
23
+ module Ronin
24
+ module Recon
25
+ module OutputFormats
26
+ #
27
+ # Represents a GraphViz PDF (`.pdf`) output format.
28
+ #
29
+ class PDF < GraphvizFormat
30
+
31
+ #
32
+ # The desired GraphViz output format.
33
+ #
34
+ # @return [:pdf]
35
+ #
36
+ def format
37
+ :pdf
38
+ end
39
+
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ronin-recon - A micro-framework and tool for performing reconnaissance.
4
+ #
5
+ # Copyright (c) 2023-2024 Hal Brodigan (postmodern.mod3@gmail.com)
6
+ #
7
+ # ronin-recon is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published
9
+ # by the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # ronin-recon is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with ronin-recon. If not, see <https://www.gnu.org/licenses/>.
19
+ #
20
+
21
+ require 'ronin/recon/output_formats/graphviz_format'
22
+
23
+ module Ronin
24
+ module Recon
25
+ module OutputFormats
26
+ #
27
+ # Represents a GraphViz PNG (`.png`) output format.
28
+ #
29
+ class PNG < GraphvizFormat
30
+
31
+ #
32
+ # The desired GraphViz output format.
33
+ #
34
+ # @return [:png]
35
+ #
36
+ def format
37
+ :png
38
+ end
39
+
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ronin-recon - A micro-framework and tool for performing reconnaissance.
4
+ #
5
+ # Copyright (c) 2023-2024 Hal Brodigan (postmodern.mod3@gmail.com)
6
+ #
7
+ # ronin-recon is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published
9
+ # by the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # ronin-recon is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with ronin-recon. If not, see <https://www.gnu.org/licenses/>.
19
+ #
20
+
21
+ require 'ronin/recon/output_formats/graphviz_format'
22
+
23
+ module Ronin
24
+ module Recon
25
+ module OutputFormats
26
+ #
27
+ # Represents a GraphViz SVG (`.svg`) output format.
28
+ #
29
+ class SVG < GraphvizFormat
30
+
31
+ #
32
+ # The desired GraphViz output format.
33
+ #
34
+ # @return [:svg]
35
+ #
36
+ def format
37
+ :svg
38
+ end
39
+
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ronin-recon - A micro-framework and tool for performing reconnaissance.
4
+ #
5
+ # Copyright (c) 2023-2024 Hal Brodigan (postmodern.mod3@gmail.com)
6
+ #
7
+ # ronin-recon is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published
9
+ # by the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # ronin-recon is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with ronin-recon. If not, see <https://www.gnu.org/licenses/>.
19
+ #
20
+
21
+ require 'ronin/core/output_formats'
22
+ require 'ronin/recon/output_formats/dir'
23
+ require 'ronin/recon/output_formats/dot'
24
+ require 'ronin/recon/output_formats/svg'
25
+ require 'ronin/recon/output_formats/png'
26
+ require 'ronin/recon/output_formats/pdf'
27
+
28
+ module Ronin
29
+ module Recon
30
+ #
31
+ # Contains the supported output formats for saving {Ronin::Recon::Values}
32
+ # object to output files.
33
+ #
34
+ module OutputFormats
35
+ include Core::OutputFormats
36
+
37
+ register :txt, '.txt', TXT
38
+ register :csv, '.csv', CSV
39
+ register :json, '.json', JSON
40
+ register :ndjson, '.ndjson', NDJSON
41
+ register :dir, '', Dir
42
+ register :dot, '.dot', Dot
43
+ register :svg, '.svg', SVG
44
+ register :png, '.png', PNG
45
+ register :pdf, '.pdf', PDF
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ronin-recon - A micro-framework and tool for performing reconnaissance.
4
+ #
5
+ # Copyright (c) 2023-2024 Hal Brodigan (postmodern.mod3@gmail.com)
6
+ #
7
+ # ronin-recon is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published
9
+ # by the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # ronin-recon is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with ronin-recon. If not, see <https://www.gnu.org/licenses/>.
19
+ #
20
+
21
+ require 'ronin/core/class_registry'
22
+ require 'ronin/repos/class_dir'
23
+
24
+ module Ronin
25
+ #
26
+ # Namespace for various worker classes.
27
+ #
28
+ module Recon
29
+ include Core::ClassRegistry
30
+ include Repos::ClassDir
31
+
32
+ class_dir "#{__dir__}/builtin"
33
+ repo_class_dir 'recon'
34
+ end
35
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ronin-recon - A micro-framework and tool for performing reconnaissance.
4
+ #
5
+ # Copyright (c) 2023-2024 Hal Brodigan (postmodern.mod3@gmail.com)
6
+ #
7
+ # ronin-recon is free software: you can redistribute it and/or modify
8
+ # it under the terms of the GNU Lesser General Public License as published
9
+ # by the Free Software Foundation, either version 3 of the License, or
10
+ # (at your option) any later version.
11
+ #
12
+ # ronin-recon is distributed in the hope that it will be useful,
13
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ # GNU Lesser General Public License for more details.
16
+ #
17
+ # You should have received a copy of the GNU Lesser General Public License
18
+ # along with ronin-recon. If not, see <https://www.gnu.org/licenses/>.
19
+ #
20
+
21
+ module Ronin
22
+ module Recon
23
+ # Path to `ronin-recon` root directory.
24
+ #
25
+ # @api private
26
+ ROOT = File.expand_path(File.join(__dir__,'..','..','..'))
27
+
28
+ # Path to wordlists directory
29
+ #
30
+ # @api private
31
+ WORDLISTS_DIR = File.join(ROOT, "data", "wordlists")
32
+ end
33
+ end