Yarilo  v0.9
WPA2 Decrypter & Packet Analyzer
main.cpp File Reference
#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, "Filename to sniff on")
 
 ABSL_FLAG (std::optional< std::string >, iface, std::nullopt, "Network interface card to use when listening or emitting packets. " "Mutually exclusive with the filename option.")
 
 ABSL_FLAG (uint32_t, port, 9090, "Port to serve the grpc server on")
 
 ABSL_FLAG (std::string, save_path, "/opt/yarlilo/saves", "Directory that yarilo will use to save decrypted traffic")
 
 ABSL_FLAG (std::string, sniff_files_path, "/opt/yarlilo/sniff_files", "Directory which will be searched for sniff files (raw montior mode " "recordings)")
 
 ABSL_FLAG (bool, save_on_shutdown, false, "Create a recording when the program terminates")
 
 ABSL_FLAG (std::string, log_level, "info", "Log level (debug, info, trace)")
 
 ABSL_FLAG (std::string, ignore_bssid, "00:00:00:00:00:00", "Ignore a bssid on startup, useful when controlling yarilo through a web " "interface")
 
bool set_log_level ()
 
std::optional< std::filesystem::path > init_saves (std::shared_ptr< spdlog::logger > log)
 
std::optional< std::filesystem::path > init_sniff_files (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[])
 

Function Documentation

◆ ABSL_FLAG() [1/8]

ABSL_FLAG ( bool  ,
save_on_shutdown  ,
false  ,
"Create a recording when the program terminates"   
)

◆ ABSL_FLAG() [2/8]

ABSL_FLAG ( std::optional< std::string >  ,
iface  ,
std::nullopt  ,
"Network interface card to use when listening or emitting packets. " "Mutually exclusive with the filename option."   
)

◆ ABSL_FLAG() [3/8]

ABSL_FLAG ( std::optional< std::string >  ,
sniff_file  ,
std::nullopt  ,
"Filename to sniff on"   
)

◆ ABSL_FLAG() [4/8]

ABSL_FLAG ( std::string  ,
ignore_bssid  ,
"00:00:00:00:00:00"  ,
"Ignore a bssid on  startup,
useful when controlling yarilo through a web " "interface"   
)

◆ ABSL_FLAG() [5/8]

ABSL_FLAG ( std::string  ,
log_level  ,
"info"  ,
"Log level (debug, info, trace)"   
)

◆ ABSL_FLAG() [6/8]

ABSL_FLAG ( std::string  ,
save_path  ,
"/opt/yarlilo/saves"  ,
"Directory that yarilo will use to save decrypted traffic"   
)

◆ ABSL_FLAG() [7/8]

ABSL_FLAG ( std::string  ,
sniff_files_path  ,
"/opt/yarlilo/sniff_files"  ,
"Directory which will be searched for sniff files (raw montior mode " "recordings)"   
)

◆ ABSL_FLAG() [8/8]

ABSL_FLAG ( uint32_t  ,
port  ,
9090  ,
"Port to serve the grpc server on"   
)

◆ handle_signal()

void handle_signal ( int  sig)

◆ init_first_sniffer()

bool init_first_sniffer ( std::shared_ptr< spdlog::logger >  log)

◆ init_saves()

std::optional<std::filesystem::path> init_saves ( std::shared_ptr< spdlog::logger >  log)

◆ init_sniff_files()

std::optional<std::filesystem::path> init_sniff_files ( std::shared_ptr< spdlog::logger >  log)

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ set_log_level()

bool set_log_level ( )

◆ shutdown_check()

void shutdown_check ( )