#!/usr/bin/env ruby require 'commander/import' require File.dirname(__FILE__) + '/../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 '--tdessessioncount', '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 '--dirlistredir', 'Show 301 redirects (only with --dir)' c.option '--files', 'Performs a search for a large list of common files' c.option '--srv', 'Scan for known SRV DNS Records' c.option '--subdomains', 'Search for Common Subdomains' c.option '--proxy STRING', String, 'HTTP Proxy Server (such as Burp Suite)' c.option '--cookie STRING', String, 'Session cookie' c.option '--nodns', 'Disable DNS checks' 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 '--tdessessioncount', '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.option '--nodns', 'Disable DNS checks' 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 '--tdessessioncount', '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 command :dns do |c| c.syntax = './yawast dns URL' c.description = 'Gets information about the server DNS configuration' c.action do |args, options| Yawast::Commands::DNS.process(args, options) end end