#include "parser.hpp" using namespace std; // Компиляция из директории вызвать команду make my_app // Запуск: ./my_app [флаги и аргументы к ним] (начать можно с флага --help) int main(int argc, char *argv[]) { Options opts; int error = parse_params(argc, argv, opts); if (!error) { if (opts.attack_type == "flood") { cout << "type attack: " << opts.attack_type << "\n"; cout << "domain: " << opts.domain << "\n"; cout << "ip: " << opts.ip << "\n"; cout << "port: " << opts.port << "\n"; cout << "log file path: " << opts.log_file << "\n"; } else if (opts.attack_type == "scan") { cout << "type attack: " << opts.attack_type << "\n"; cout << "domain: " << opts.domain << "\n"; cout << "ip: " << opts.ip << "\n"; cout << "log file path: " << opts.log_file << "\n"; } if (!opts.telegram_id.empty()) { cout << "telegram_id: " << opts.telegram_id << "\n"; } if (!opts.telegram_token.empty()) { cout << "telegram_token: " << opts.telegram_token << "\n"; } } return 0; }