Cookies: Added Clean Up After Getting Firefox Cookies

This commit is contained in:
Moss 2022-10-01 14:39:29 -04:00
parent 0085adf4d9
commit 39b45a081d
1 changed files with 14 additions and 0 deletions

View File

@ -181,6 +181,16 @@ std::vector<dropout_dl::cookie> get_cookies_from_firefox(const std::filesystem::
session.get_value_from_db(db, "FROM moz_cookies WHERE host LIKE '%dropout.tv%'", "value"); session.get_value_from_db(db, "FROM moz_cookies WHERE host LIKE '%dropout.tv%'", "value");
sqlite3_close(db); sqlite3_close(db);
std::filesystem::remove("tmp/firefox_cookies.sqlite");
if (std::filesystem::is_empty("tmp")) {
std::filesystem::remove("tmp/");
}
}
else {
std::cerr << "FIREFOX COOKIE ERROR: Attempted to get cookies from firefox without profile." << std::endl;
exit(4);
} }
if (verbose) { if (verbose) {
@ -246,6 +256,10 @@ std::vector<dropout_dl::cookie> get_cookies_from_chrome(const std::filesystem::p
sqlite3_close(db); sqlite3_close(db);
} }
else {
std::cerr << "CHROME COOKIE ERROR: Attempted to get cookies from chrome without profile." << std::endl;
exit(4);
}
auth.chrome_decrypt(); auth.chrome_decrypt();