#!/usr/bin/env ruby require 'commander/import' require './lib/yawast' program :name, 'yawast' program :version, Yawast::VERSION program :description, Yawast::DESCRIPTION default_command :help command :scan do |c| c.syntax = './yawast scan URL' c.description = 'Scans the provided URL' c.option '--nossl', 'Disables SSL checks' c.option '--nociphers', 'Disables check for supported ciphers (only with --internalssl)' c.option '--internalssl', 'Disable SSL Labs integration' c.option '--sslsessioncount', 'Counts the number of messages that can be sent in a single session' c.option '--dir', 'Enables directory search' c.option '--dirrecursive', 'Recursive directory search (only with --dir)' c.option '--proxy STRING', String, 'HTTP Proxy Server (such as Burp Suite)' c.option '--cookie STRING', String, 'Session cookie' c.action do |args, options| Yawast::Commands::Scan.process(args, options) end end command :head do |c| c.syntax = './yawast head URL' c.description = 'Scans the HEAD response of the provided URL' c.option '--nossl', 'Disables SSL checks' c.option '--nociphers', 'Disables check for supported ciphers (only with --internalssl)' c.option '--internalssl', 'Disable SSL Labs integration' c.option '--sslsessioncount', 'Counts the number of messages that can be sent in a single session' c.option '--proxy STRING', String, 'HTTP Proxy Server (such as Burp Suite)' c.option '--cookie STRING', String, 'Session cookie' c.action do |args, options| Yawast::Commands::Head.process(args, options) end end command :ssl do |c| c.syntax = './yawast ssl URL' c.description = 'Displays SSL information' c.option '--nociphers', 'Disables check for supported ciphers (only with --internalssl)' c.option '--internalssl', 'Disable SSL Labs integration' c.option '--sslsessioncount', 'Counts the number of messages that can be sent in a single session' c.action do |args, options| Yawast::Commands::Ssl.process(args, options) end end command :cms do |c| c.syntax = './yawast cms URL' c.description = 'Detect the CMS in use' c.option '--proxy STRING', String, 'HTTP Proxy Server (such as Burp Suite)' c.option '--cookie STRING', String, 'Session cookie' c.action do |args, options| Yawast::Commands::Cms.process(args, options) end end