#!/usr/bin/env ruby # -*- mode: ruby -*- # vi: set ft=ruby : require 'cryptic' require 'threat_agent' require 'threat_agent/tasks' require 'thor' class ThreatAgentCLI < Thor # desc 'breachbot [SUBCOMMAND]', 'Monitor website changes' # subcommand :breachbot, ThreatAgent::Tasks::Breachbot # desc 'drone [SUBCOMMAND]', 'Launch or review Drone security assessments' # subcommand :drone, ThreatAgent::Tasks::Drone # desc 'exfiltrate [SUBCOMMAND]', 'Check if devices can detect sensitive data' # subcommand :exfiltrate, ThreatAgent::Tasks::Exfiltrate desc 'keygen [OPTIONS]', 'Generate an RSA keypair' method_option :passphrase, aliases: %w[-P], default: nil, desc: 'The passphrase to give your private key' method_option :path, aliases: %w[-o], default: '.', desc: 'The path to save generated keys to' def keygen keypair = Cryptic::Keypair.generate(options[:passphrase]) keypair.save(options[:path]) end # desc 'passision [SUBCOMMAND]', 'Create a locale/organization aware wordlists' # subcommand :passision, ThreatAgent::Tasks::Passision # desc 'phishable [SUBCOMMAND]', 'Launch phishing campaigns' # subcommand :phishable, ThreatAgent::Tasks::Phishable desc 'pwnxy [SUBCOMMAND]', 'Create a Pwnxy instance' subcommand :pwnxy, ThreatAgent::Tasks::Pwnxy end # TODO: Add a global configuration instead of independently loading it # everytime? config = ThreatAgent::Config config.from_file("#{ENV['HOME']}/.threatagent") $threat_agent_client = ThreatAgent::APIClient.new(config[:key], config[:sup]) ThreatAgentCLI.start(ARGV)