Yarilo v0.9.9
WPA2 Decrypter & Packet Analyzer
|
#include "log_sink.h"
#include "service.h"
#include <absl/flags/flag.h>
#include <absl/flags/internal/flag.h>
#include <absl/flags/parse.h>
#include <absl/flags/usage.h>
#include <absl/strings/str_format.h>
#include <csignal>
#include <grpcpp/ext/proto_server_reflection_plugin.h>
#include <grpcpp/server_builder.h>
#include <memory>
#include <optional>
#include <spdlog/common.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/spdlog.h>
#include <tins/utils/routing_utils.h>
Functions | |
ABSL_FLAG (std::optional< std::string >, sniff_file, std::nullopt, "Create a FileSniffer from this file on startup") | |
ABSL_FLAG (std::optional< std::string >, iface, std::nullopt, "Create an InterfaceSniffer from this file on startup") | |
ABSL_FLAG (std::string, host, "0.0.0.0", "Host for the gRPC server") | |
ABSL_FLAG (uint32_t, port, 9090, "Port for the gRPC server") | |
ABSL_FLAG (std::string, save_path, "/opt/yarilo/saves", "Directory to discover and save packet captures") | |
ABSL_FLAG (std::string, db_file, "/opt/yarilo/db.sqlite3", "Path to the database file") | |
ABSL_FLAG (std::string, oid_file, "/opt/yarilo/src/backend/data/oid.txt", "Path to the OIDs list for MAC vendor lookup") | |
ABSL_FLAG (bool, save_on_shutdown, false, "Dump all packets on program termination") | |
ABSL_FLAG (std::string, log_level, "info", "Log level (debug, info, trace)") | |
ABSL_FLAG (std::vector< std::string >, ignore_bssids, {}, "Access point hardware addresses to ignore on startup") | |
ABSL_FLAG (std::string, battery_file, "/tmp/battery_level", "Path to the battery percentage file (only with battery support enabled)") | |
bool | set_log_level () |
std::optional< std::filesystem::path > | init_saves (std::shared_ptr< spdlog::logger > log) |
std::optional< std::filesystem::path > | init_oid_file (std::shared_ptr< spdlog::logger > log) |
std::optional< std::filesystem::path > | init_battery_file (std::shared_ptr< spdlog::logger > log) |
bool | init_first_sniffer (std::shared_ptr< spdlog::logger > log) |
void | handle_signal (int sig) |
void | shutdown_check () |
int | main (int argc, char *argv[]) |
ABSL_FLAG | ( | bool | , |
save_on_shutdown | , | ||
false | , | ||
"Dump all packets on program termination" | ) |
ABSL_FLAG | ( | std::optional< std::string > | , |
iface | , | ||
std::nullopt | , | ||
"Create an InterfaceSniffer from this file on startup" | ) |
ABSL_FLAG | ( | std::optional< std::string > | , |
sniff_file | , | ||
std::nullopt | , | ||
"Create a FileSniffer from this file on startup" | ) |
ABSL_FLAG | ( | std::string | , |
battery_file | , | ||
"/tmp/battery_level" | , | ||
"Path to the battery percentage file (only with battery support enabled)" | ) |
ABSL_FLAG | ( | std::string | , |
db_file | , | ||
"/opt/yarilo/db.sqlite3" | , | ||
"Path to the database file" | ) |
ABSL_FLAG | ( | std::string | , |
host | , | ||
"0.0.0.0" | , | ||
"Host for the gRPC server" | ) |
ABSL_FLAG | ( | std::string | , |
log_level | , | ||
"info" | , | ||
"Log level (debug, info, trace)" | ) |
ABSL_FLAG | ( | std::string | , |
oid_file | , | ||
"/opt/yarilo/src/backend/data/oid.txt" | , | ||
"Path to the OIDs list for MAC vendor lookup" | ) |
ABSL_FLAG | ( | std::string | , |
save_path | , | ||
"/opt/yarilo/saves" | , | ||
"Directory to discover and save packet captures" | ) |
ABSL_FLAG | ( | std::vector< std::string > | , |
ignore_bssids | , | ||
{} | , | ||
"Access point hardware addresses to ignore on startup" | ) |
ABSL_FLAG | ( | uint32_t | , |
port | , | ||
9090 | , | ||
"Port for the gRPC server" | ) |
void handle_signal | ( | int | sig | ) |
std::optional< std::filesystem::path > init_battery_file | ( | std::shared_ptr< spdlog::logger > | log | ) |
bool init_first_sniffer | ( | std::shared_ptr< spdlog::logger > | log | ) |
std::optional< std::filesystem::path > init_oid_file | ( | std::shared_ptr< spdlog::logger > | log | ) |
std::optional< std::filesystem::path > init_saves | ( | std::shared_ptr< spdlog::logger > | log | ) |
int main | ( | int | argc, |
char * | argv[] ) |
bool set_log_level | ( | ) |
void shutdown_check | ( | ) |