ronin-web 2.0.0.rc1 → 2.0.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 +4 -4
- data/.github/workflows/ruby.yml +1 -0
- data/.ruby-version +1 -1
- data/ChangeLog.md +18 -3
- data/README.md +1 -1
- data/data/completions/ronin-web +80 -68
- data/gemspec.yml +8 -8
- data/lib/ronin/web/cli/browser_options.rb +1 -1
- data/lib/ronin/web/cli/browser_shell.rb +3 -2
- data/lib/ronin/web/cli/command.rb +3 -3
- data/lib/ronin/web/cli/commands/browser.rb +5 -5
- data/lib/ronin/web/cli/commands/completion.rb +3 -2
- data/lib/ronin/web/cli/commands/diff.rb +3 -3
- data/lib/ronin/web/cli/commands/html.rb +3 -3
- data/lib/ronin/web/cli/commands/irb.rb +3 -3
- data/lib/ronin/web/cli/commands/new/app.rb +3 -3
- data/lib/ronin/web/cli/commands/new/nokogiri.rb +3 -3
- data/lib/ronin/web/cli/commands/new/server.rb +3 -3
- data/lib/ronin/web/cli/commands/new/spider.rb +3 -3
- data/lib/ronin/web/cli/commands/new.rb +3 -2
- data/lib/ronin/web/cli/commands/reverse_proxy.rb +3 -2
- data/lib/ronin/web/cli/commands/screenshot.rb +3 -3
- data/lib/ronin/web/cli/commands/server.rb +4 -3
- data/lib/ronin/web/cli/commands/session_cookie.rb +3 -2
- data/lib/ronin/web/cli/commands/spider.rb +4 -3
- data/lib/ronin/web/cli/commands/user_agent.rb +3 -2
- data/lib/ronin/web/cli/commands/vulns.rb +4 -3
- data/lib/ronin/web/cli/commands/wordlist.rb +4 -4
- data/lib/ronin/web/cli/commands/xml.rb +3 -3
- data/lib/ronin/web/cli/js_shell.rb +1 -1
- data/lib/ronin/web/cli/ruby_shell.rb +1 -1
- data/lib/ronin/web/cli/spider_options.rb +1 -1
- data/lib/ronin/web/cli.rb +3 -2
- data/lib/ronin/web/root.rb +1 -1
- data/lib/ronin/web/version.rb +2 -2
- data/lib/ronin/web.rb +4 -2
- data/man/ronin-web-xml.1 +1 -1
- data/man/ronin-web-xml.1.md +1 -1
- data/ronin-web.gemspec +1 -0
- metadata +24 -21
- data/lib/ronin/web/html.rb +0 -86
- data/lib/ronin/web/xml.rb +0 -86
data/lib/ronin/web/xml.rb
DELETED
@@ -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
|
-
# XML helper methods.
|
27
|
-
#
|
28
|
-
# @since 1.0.0
|
29
|
-
#
|
30
|
-
module XML
|
31
|
-
#
|
32
|
-
# Parses the body of a document into a HTML document object.
|
33
|
-
#
|
34
|
-
# @param [String, IO] xml
|
35
|
-
# The XML 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::XML::Document] doc
|
42
|
-
# The new XML document object.
|
43
|
-
#
|
44
|
-
# @return [Nokogiri::XML::Document]
|
45
|
-
# The new HTML document object.
|
46
|
-
#
|
47
|
-
# @see http://rubydoc.info/gems/nokogiri/Nokogiri/XML/Document
|
48
|
-
#
|
49
|
-
# @api public
|
50
|
-
#
|
51
|
-
def self.parse(xml)
|
52
|
-
doc = Nokogiri::XML.parse(xml)
|
53
|
-
yield doc if block_given?
|
54
|
-
return doc
|
55
|
-
end
|
56
|
-
|
57
|
-
#
|
58
|
-
# Creates a new `Nokogiri::XML::Builder`.
|
59
|
-
#
|
60
|
-
# @yield []
|
61
|
-
# The block that will be used to construct the XML document.
|
62
|
-
#
|
63
|
-
# @return [Nokogiri::XML::Builder]
|
64
|
-
# The new XML 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/XML/Builder
|
78
|
-
#
|
79
|
-
# @api public
|
80
|
-
#
|
81
|
-
def self.build(&block)
|
82
|
-
Nokogiri::XML::Builder.new(&block)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|