2020-10-07 10:36:04 +00:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2020-12-26 19:56:06 +00:00
|
|
|
// Copyright (c) 2020-2021, The Monero Project.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
#include "whonix.h"
|
|
|
|
|
|
|
|
#include "utils/utils.h"
|
|
|
|
|
|
|
|
bool WhonixOS::detect() {
|
|
|
|
return !QString::fromLocal8Bit(qgetenv("WHONIX")).isEmpty();
|
2021-01-21 01:38:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QString WhonixOS::version() {
|
|
|
|
if (!Utils::fileExists("/etc/whonix_version"))
|
|
|
|
return "";
|
|
|
|
|
|
|
|
return Utils::barrayToString(Utils::fileOpen("/etc/whonix_version")).trimmed();
|
2020-10-07 10:36:04 +00:00
|
|
|
}
|