lib/ronin/cli/commands/cert_grab.rb in ronin-2.0.5 vs lib/ronin/cli/commands/cert_grab.rb in ronin-2.1.0.rc1
- old
+ new
@@ -16,11 +16,11 @@
# along with Ronin. If not, see <https://www.gnu.org/licenses/>.
#
require 'ronin/cli/value_processor_command'
require 'ronin/cli/host_and_port'
-require 'ronin/support/network/ssl/mixin'
+require 'ronin/support/network/ssl'
require 'uri'
module Ronin
class CLI
@@ -49,12 +49,13 @@
# ronin cert-grab https://github.com/
#
class CertGrab < ValueProcessorCommand
include HostAndPort
- include Support::Network::SSL::Mixin
+ command_name 'cert-grab'
+
usage '[options] {HOST:PORT | URL} ...'
argument :target, required: true,
repeats: true,
usage: 'HOST:PORT | URL',
@@ -114,10 +115,10 @@
#
# @param [Integer] port
# The port to connect to.
#
def grab_cert(host,port)
- cert = ssl_cert(host,port)
+ cert = Support::Network::SSL.get_cert(host,port)
cert.save(cert_file_for(host,port))
end
end