parser beta 0.1

This commit is contained in:
tieshagr
2025-03-05 19:23:52 +03:00
parent b7fc57513d
commit 7493c803fa
4 changed files with 166 additions and 0 deletions

19
src/parser.hpp Normal file
View File

@@ -0,0 +1,19 @@
#pragma once
#include <iostream>
#include <string>
#include <unistd.h>
#include <getopt.h> // Для struct option
struct Options {
std::string attack_type; // Обязательный параметр
std::string domain; // Обязательный параметр
std::string ip; // Обязательный параметр
std::string port; // Обязательный параметр (не обязательный для скана)
std::string log_file = "/var/logs/DosAtk"; // Значение по умолчанию, не обязательный
std::string telegram_id; // Не обязательный параметр
std::string telegram_token; // Не обязательный параметр
};
// Прототип функции парсинга
int parse_params(int argc, char** argv, Options& opts);