ronin-web 2.0.0.rc1 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +1 -0
  3. data/.ruby-version +1 -1
  4. data/ChangeLog.md +18 -3
  5. data/README.md +1 -1
  6. data/data/completions/ronin-web +80 -68
  7. data/gemspec.yml +8 -8
  8. data/lib/ronin/web/cli/browser_options.rb +1 -1
  9. data/lib/ronin/web/cli/browser_shell.rb +3 -2
  10. data/lib/ronin/web/cli/command.rb +3 -3
  11. data/lib/ronin/web/cli/commands/browser.rb +5 -5
  12. data/lib/ronin/web/cli/commands/completion.rb +3 -2
  13. data/lib/ronin/web/cli/commands/diff.rb +3 -3
  14. data/lib/ronin/web/cli/commands/html.rb +3 -3
  15. data/lib/ronin/web/cli/commands/irb.rb +3 -3
  16. data/lib/ronin/web/cli/commands/new/app.rb +3 -3
  17. data/lib/ronin/web/cli/commands/new/nokogiri.rb +3 -3
  18. data/lib/ronin/web/cli/commands/new/server.rb +3 -3
  19. data/lib/ronin/web/cli/commands/new/spider.rb +3 -3
  20. data/lib/ronin/web/cli/commands/new.rb +3 -2
  21. data/lib/ronin/web/cli/commands/reverse_proxy.rb +3 -2
  22. data/lib/ronin/web/cli/commands/screenshot.rb +3 -3
  23. data/lib/ronin/web/cli/commands/server.rb +4 -3
  24. data/lib/ronin/web/cli/commands/session_cookie.rb +3 -2
  25. data/lib/ronin/web/cli/commands/spider.rb +4 -3
  26. data/lib/ronin/web/cli/commands/user_agent.rb +3 -2
  27. data/lib/ronin/web/cli/commands/vulns.rb +4 -3
  28. data/lib/ronin/web/cli/commands/wordlist.rb +4 -4
  29. data/lib/ronin/web/cli/commands/xml.rb +3 -3
  30. data/lib/ronin/web/cli/js_shell.rb +1 -1
  31. data/lib/ronin/web/cli/ruby_shell.rb +1 -1
  32. data/lib/ronin/web/cli/spider_options.rb +1 -1
  33. data/lib/ronin/web/cli.rb +3 -2
  34. data/lib/ronin/web/root.rb +1 -1
  35. data/lib/ronin/web/version.rb +2 -2
  36. data/lib/ronin/web.rb +4 -2
  37. data/man/ronin-web-xml.1 +1 -1
  38. data/man/ronin-web-xml.1.md +1 -1
  39. data/ronin-web.gemspec +1 -0
  40. metadata +24 -21
  41. data/lib/ronin/web/html.rb +0 -86
  42. data/lib/ronin/web/xml.rb +0 -86
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  #
3
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
3
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
4
4
  #
5
5
  # ronin-web is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,8 @@
16
16
  # along with ronin-web. If not, see <https://www.gnu.org/licenses/>.
17
17
  #
18
18
 
19
- require 'ronin/web/cli/command'
19
+ require_relative '../command'
20
+
20
21
  require 'command_kit/commands/auto_load'
21
22
 
22
23
  module Ronin
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,8 @@
18
18
  # along with ronin-web. If not, see <https://www.gnu.org/licenses/>.
19
19
  #
20
20
 
21
- require 'ronin/web/cli/command'
21
+ require_relative '../command'
22
+
22
23
  require 'ronin/core/cli/logging'
23
24
  require 'ronin/web/server/reverse_proxy'
24
25
 
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -18,8 +18,8 @@
18
18
  # along with ronin-web. If not, see <https://www.gnu.org/licenses/>.
19
19
  #
20
20
 
21
- require 'ronin/web/cli/command'
22
- require 'ronin/web/cli/browser_options'
21
+ require_relative '../command'
22
+ require_relative '../browser_options'
23
23
 
24
24
  require 'ronin/core/cli/logging'
25
25
 
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,8 @@
18
18
  # along with ronin-web. If not, see <https://www.gnu.org/licenses/>.
19
19
  #
20
20
 
21
- require 'ronin/web/cli/command'
21
+ require_relative '../command'
22
+
22
23
  require 'ronin/core/cli/logging'
23
24
  require 'ronin/web/server'
24
25
 
@@ -134,7 +135,7 @@ module Ronin
134
135
  App.public_dir = options[:root]
135
136
  else
136
137
  App.any('*') do
137
- puts "#{request.request_method} #{request.path}"
138
+ puts "#{request.request_method} #{request.fullpath}"
138
139
 
139
140
  request.headers.each do |name,value|
140
141
  puts "#{name}: #{value}"
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,8 @@
18
18
  # along with ronin-web. If not, see <https://www.gnu.org/licenses/>.
19
19
  #
20
20
 
21
- require 'ronin/web/cli/command'
21
+ require_relative '../command'
22
+
22
23
  require 'ronin/web/session_cookie'
23
24
  require 'ronin/support/network/http'
24
25
  require 'ronin/support/encoding/hex'
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -18,8 +18,9 @@
18
18
  # along with ronin-web. If not, see <https://www.gnu.org/licenses/>.
19
19
  #
20
20
 
21
- require 'ronin/web/cli/command'
22
- require 'ronin/web/cli/spider_options'
21
+ require_relative '../command'
22
+ require_relative '../spider_options'
23
+
23
24
  require 'ronin/web/spider/archive'
24
25
  require 'ronin/web/spider/git_archive'
25
26
  require 'ronin/support/network/http/user_agents'
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,8 @@
18
18
  # along with ronin-web. If not, see <https://www.gnu.org/licenses/>.
19
19
  #
20
20
 
21
- require 'ronin/web/cli/command'
21
+ require_relative '../command'
22
+
22
23
  require 'ronin/web/user_agents'
23
24
 
24
25
  module Ronin
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -18,8 +18,9 @@
18
18
  # along with ronin-web. If not, see <https://www.gnu.org/licenses/>.
19
19
  #
20
20
 
21
- require 'ronin/web/cli/command'
22
- require 'ronin/web/cli/spider_options'
21
+ require_relative '../command'
22
+ require_relative '../spider_options'
23
+
23
24
  require 'ronin/core/cli/logging'
24
25
  require 'ronin/vulns/url_scanner'
25
26
  require 'ronin/vulns/cli/printing'
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -18,10 +18,10 @@
18
18
  # along with ronin-web. If not, see <https://www.gnu.org/licenses/>.
19
19
  #
20
20
 
21
- require 'ronin/web/cli/command'
22
- require 'ronin/web/cli/spider_options'
23
- require 'ronin/core/cli/logging'
21
+ require_relative '../command'
22
+ require_relative '../spider_options'
24
23
 
24
+ require 'ronin/core/cli/logging'
25
25
  require 'wordlist/builder'
26
26
  require 'nokogiri'
27
27
 
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -18,9 +18,9 @@
18
18
  # along with ronin-web. If not, see <https://www.gnu.org/licenses/>.
19
19
  #
20
20
 
21
- require 'ronin/web/cli/command'
22
- require 'ronin/support/network/http'
21
+ require_relative '../command'
23
22
 
23
+ require 'ronin/support/network/http'
24
24
  require 'nokogiri'
25
25
 
26
26
  module Ronin
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
data/lib/ronin/web/cli.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -18,13 +18,14 @@
18
18
  # along with ronin-web. If not, see <https://www.gnu.org/licenses/>.
19
19
  #
20
20
 
21
- require 'ronin/web/version'
22
21
  require 'ronin/core/cli/help/banner'
23
22
 
24
23
  require 'command_kit/commands'
25
24
  require 'command_kit/commands/auto_load'
26
25
  require 'command_kit/options/version'
27
26
 
27
+ require_relative 'version'
28
+
28
29
  module Ronin
29
30
  module Web
30
31
  #
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -21,6 +21,6 @@
21
21
  module Ronin
22
22
  module Web
23
23
  # ronin-web Version
24
- VERSION = '2.0.0.rc1'
24
+ VERSION = '2.0.1'
25
25
  end
26
26
  end
data/lib/ronin/web.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # ronin-web - A collection of useful web helper methods and commands.
4
4
  #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
5
+ # Copyright (c) 2006-2025 Hal Brodigan (postmodern.mod3 at gmail.com)
6
6
  #
7
7
  # ronin-web is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
@@ -19,8 +19,10 @@
19
19
  #
20
20
 
21
21
  require 'ronin/support/web'
22
- require 'ronin/web/spider'
22
+ require 'ronin/web/browser'
23
23
  require 'ronin/web/server'
24
+ require 'ronin/web/session_cookie'
25
+ require 'ronin/web/spider'
24
26
  require 'ronin/web/user_agents'
25
27
  require 'ronin/web/version'
26
28
 
data/man/ronin-web-xml.1 CHANGED
@@ -9,7 +9,7 @@ ronin\-web\-xml \- Performs XPath queries on a URL or XML file
9
9
  \fBronin\-web xml\fR \[lB]\fIoptions\fP\[rB] \[lC]\fIURL\fP \[or] \fIFILE\fP\[rC] \[lB]\fIXPATH\fP\[rB]
10
10
  .SH DESCRIPTION
11
11
  .PP
12
- Performs XPath queries on a URL or HTML file\.
12
+ Performs XPath queries on a URL or XML file\.
13
13
  .SH ARGUMENTS
14
14
  .TP
15
15
  \fIURL\fP
@@ -10,7 +10,7 @@ ronin-web-xml - Performs XPath queries on a URL or XML file
10
10
 
11
11
  ## DESCRIPTION
12
12
 
13
- Performs XPath queries on a URL or HTML file.
13
+ Performs XPath queries on a URL or XML file.
14
14
 
15
15
  ## ARGUMENTS
16
16
 
data/ronin-web.gemspec CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |gem|
20
20
  gem.authors = Array(gemspec['authors'])
21
21
  gem.email = gemspec['email']
22
22
  gem.homepage = gemspec['homepage']
23
+ gem.metadata = gemspec['metadata'] if gemspec['metadata']
23
24
 
24
25
  glob = ->(patterns) { gem.files & Dir[*patterns] }
25
26
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronin-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc1
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Postmodern
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-23 00:00:00.000000000 Z
11
+ date: 2025-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -92,42 +92,42 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 1.1.0.rc1
95
+ version: '1.1'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 1.1.0.rc1
102
+ version: '1.1'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: ronin-support-web
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: 0.1.0.rc1
109
+ version: '0.1'
110
110
  type: :runtime
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: 0.1.0.rc1
116
+ version: '0.1'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: ronin-web-browser
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: 0.1.0.rc1
123
+ version: '0.1'
124
124
  type: :runtime
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: 0.1.0.rc1
130
+ version: '0.1'
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: ronin-web-server
133
133
  requirement: !ruby/object:Gem::Requirement
@@ -154,14 +154,14 @@ dependencies:
154
154
  requirements:
155
155
  - - "~>"
156
156
  - !ruby/object:Gem::Version
157
- version: 0.2.0.rc1
157
+ version: '0.2'
158
158
  type: :runtime
159
159
  prerelease: false
160
160
  version_requirements: !ruby/object:Gem::Requirement
161
161
  requirements:
162
162
  - - "~>"
163
163
  - !ruby/object:Gem::Version
164
- version: 0.2.0.rc1
164
+ version: '0.2'
165
165
  - !ruby/object:Gem::Dependency
166
166
  name: ronin-web-user_agents
167
167
  requirement: !ruby/object:Gem::Requirement
@@ -182,42 +182,42 @@ dependencies:
182
182
  requirements:
183
183
  - - "~>"
184
184
  - !ruby/object:Gem::Version
185
- version: 0.1.0.rc1
185
+ version: '0.1'
186
186
  type: :runtime
187
187
  prerelease: false
188
188
  version_requirements: !ruby/object:Gem::Requirement
189
189
  requirements:
190
190
  - - "~>"
191
191
  - !ruby/object:Gem::Version
192
- version: 0.1.0.rc1
192
+ version: '0.1'
193
193
  - !ruby/object:Gem::Dependency
194
194
  name: ronin-core
195
195
  requirement: !ruby/object:Gem::Requirement
196
196
  requirements:
197
197
  - - "~>"
198
198
  - !ruby/object:Gem::Version
199
- version: 0.2.0.rc1
199
+ version: '0.2'
200
200
  type: :runtime
201
201
  prerelease: false
202
202
  version_requirements: !ruby/object:Gem::Requirement
203
203
  requirements:
204
204
  - - "~>"
205
205
  - !ruby/object:Gem::Version
206
- version: 0.2.0.rc1
206
+ version: '0.2'
207
207
  - !ruby/object:Gem::Dependency
208
208
  name: ronin-vulns
209
209
  requirement: !ruby/object:Gem::Requirement
210
210
  requirements:
211
211
  - - "~>"
212
212
  - !ruby/object:Gem::Version
213
- version: 0.2.0.rc1
213
+ version: '0.2'
214
214
  type: :runtime
215
215
  prerelease: false
216
216
  version_requirements: !ruby/object:Gem::Requirement
217
217
  requirements:
218
218
  - - "~>"
219
219
  - !ruby/object:Gem::Version
220
- version: 0.2.0.rc1
220
+ version: '0.2'
221
221
  - !ruby/object:Gem::Dependency
222
222
  name: bundler
223
223
  requirement: !ruby/object:Gem::Requirement
@@ -297,10 +297,8 @@ files:
297
297
  - lib/ronin/web/cli/js_shell.rb
298
298
  - lib/ronin/web/cli/ruby_shell.rb
299
299
  - lib/ronin/web/cli/spider_options.rb
300
- - lib/ronin/web/html.rb
301
300
  - lib/ronin/web/root.rb
302
301
  - lib/ronin/web/version.rb
303
- - lib/ronin/web/xml.rb
304
302
  - man/ronin-web-browser.1
305
303
  - man/ronin-web-browser.1.md
306
304
  - man/ronin-web-completion.1
@@ -345,8 +343,13 @@ files:
345
343
  - scripts/setup
346
344
  homepage: https://github.com/ronin-rb/ronin-web#readme
347
345
  licenses:
348
- - GPL-3.0
349
- metadata: {}
346
+ - GPL-3.0-or-later
347
+ metadata:
348
+ documentation_uri: https://ronin-rb.dev/docs/ronin-web
349
+ source_code_uri: https://github.com/ronin-rb/ronin-web
350
+ bug_tracker_uri: https://github.com/ronin-rb/ronin-web/issues
351
+ changelog_uri: https://github.com/ronin-rb/ronin-web/blob/main/ChangeLog.md
352
+ rubygems_mfa_required: 'true'
350
353
  post_install_message:
351
354
  rdoc_options: []
352
355
  require_paths:
@@ -362,7 +365,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
362
365
  - !ruby/object:Gem::Version
363
366
  version: '0'
364
367
  requirements: []
365
- rubygems_version: 3.3.27
368
+ rubygems_version: 3.5.22
366
369
  signing_key:
367
370
  specification_version: 4
368
371
  summary: A collection of common web security commands and libraries.
@@ -1,86 +0,0 @@
1
- # frozen_string_literal: true
2
- #
3
- # ronin-web - A collection of useful web helper methods and commands.
4
- #
5
- # Copyright (c) 2006-2024 Hal Brodigan (postmodern.mod3 at gmail.com)
6
- #
7
- # ronin-web is free software: you can redistribute it and/or modify
8
- # it under the terms of the GNU General Public License as published by
9
- # the Free Software Foundation, either version 3 of the License, or
10
- # (at your option) any later version.
11
- #
12
- # ronin-web 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 General Public License for more details.
16
- #
17
- # You should have received a copy of the GNU General Public License
18
- # along with ronin-web. If not, see <https://www.gnu.org/licenses/>.
19
- #
20
-
21
- require 'nokogiri'
22
-
23
- module Ronin
24
- module Web
25
- #
26
- # HTML helper methods.
27
- #
28
- # @since 1.0.0
29
- #
30
- module HTML
31
- #
32
- # Parses the body of a document into a HTML document object.
33
- #
34
- # @param [String, IO] html
35
- # The HTML to parse.
36
- #
37
- # @yield [doc]
38
- # If a block is given, it will be passed the newly created document
39
- # object.
40
- #
41
- # @yieldparam [Nokogiri::HTML::Document] doc
42
- # The new HTML document object.
43
- #
44
- # @return [Nokogiri::HTML::Document]
45
- # The new HTML document object.
46
- #
47
- # @see http://rubydoc.info/gems/nokogiri/Nokogiri/HTML/Document
48
- #
49
- # @api public
50
- #
51
- def self.parse(html)
52
- doc = Nokogiri::HTML.parse(html)
53
- yield doc if block_given?
54
- return doc
55
- end
56
-
57
- #
58
- # Creates a new `Nokogiri::HTML::Builder`.
59
- #
60
- # @yield []
61
- # The block that will be used to construct the HTML document.
62
- #
63
- # @return [Nokogiri::HTML::Builder]
64
- # The new HTML builder object.
65
- #
66
- # @example
67
- # HTML.build do
68
- # html {
69
- # body {
70
- # div(style: 'display:none;') {
71
- # object(classid: 'blabla')
72
- # }
73
- # }
74
- # }
75
- # end
76
- #
77
- # @see http://rubydoc.info/gems/nokogiri/Nokogiri/HTML/Builder
78
- #
79
- # @api public
80
- #
81
- def self.build(&block)
82
- Nokogiri::HTML::Builder.new(&block)
83
- end
84
- end
85
- end
86
- end