forked from serafim/dos
1
0
Fork 0
dos/src/my_check_params.hpp

22 lines
1.1 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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; // Не обязательный параметр
};
extern Options opts; // Теперь это глобальная переменная, где она должна определяться?
// Прототип функции парсинга
int my_check_params(int argc, char** argv);