wowlet/src/utils/whonix.cpp

17 lines
417 B
C++
Raw Permalink Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2020-12-26 19:56:06 +00:00
// Copyright (c) 2020-2021, The Monero Project.
#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();
}