Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
uaclient /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
api
[ DIR ]
drwxr-xr-x
clouds
[ DIR ]
drwxr-xr-x
daemon
[ DIR ]
drwxr-xr-x
entitlements
[ DIR ]
drwxr-xr-x
files
[ DIR ]
drwxr-xr-x
jobs
[ DIR ]
drwxr-xr-x
__init__.py
0
B
-rw-r--r--
actions.py
8.19
KB
-rw-r--r--
apt.py
25.74
KB
-rw-r--r--
apt_news.py
6.33
KB
-rw-r--r--
cli.py
64.22
KB
-rw-r--r--
config.py
24.5
KB
-rw-r--r--
contract.py
27.47
KB
-rw-r--r--
contract_data_types.py
9.38
KB
-rw-r--r--
data_types.py
10.3
KB
-rw-r--r--
defaults.py
2.46
KB
-rw-r--r--
event_logger.py
7.75
KB
-rw-r--r--
exceptions.py
13.56
KB
-rw-r--r--
gpg.py
813
B
-rw-r--r--
livepatch.py
11.03
KB
-rw-r--r--
lock.py
3.58
KB
-rw-r--r--
log.py
1.89
KB
-rw-r--r--
messages.py
38.47
KB
-rw-r--r--
pip.py
756
B
-rw-r--r--
security.py
48.75
KB
-rw-r--r--
security_status.py
24.19
KB
-rw-r--r--
serviceclient.py
6.22
KB
-rw-r--r--
snap.py
4.06
KB
-rw-r--r--
status.py
25.73
KB
-rw-r--r--
system.py
17.09
KB
-rw-r--r--
types.py
308
B
-rw-r--r--
util.py
20.3
KB
-rw-r--r--
version.py
2.81
KB
-rw-r--r--
yaml.py
642
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : version.py
""" Client version related functions """ import os.path import re from math import inf from typing import Optional from uaclient.apt import ( compare_versions, get_apt_cache_policy_for_package, get_apt_cache_time, ) from uaclient.defaults import CANDIDATE_CACHE_PATH, UAC_RUN_PATH from uaclient.exceptions import ProcessExecutionError from uaclient.system import subp __VERSION__ = "27.14.4" PACKAGED_VERSION = "27.14.4~18.04" CANDIDATE_REGEX = r"Candidate: (?P<candidate>.*?)\n" def get_version() -> str: """Return the packaged version as a string Prefer the binary PACKAGED_VESION set by debian/rules to DEB_VERSION. If unavailable, check for a .git development environments: a. If run in our upstream repo `git describe` will gives a leading XX.Y so return the --long version to allow daily build recipes to count commit offset from upstream's XX.Y signed tag. b. If run in a git-ubuntu pkg repo, upstream tags aren't visible, believe __VERSION__ is correct - there is and MUST always be a test to make sure it matches debian/changelog """ if not PACKAGED_VERSION.startswith("@@PACKAGED_VERSION"): return PACKAGED_VERSION topdir = os.path.dirname(os.path.dirname(__file__)) if os.path.exists(os.path.join(topdir, ".git")): cmd = ["git", "describe", "--abbrev=8", "--match=[0-9]*", "--long"] try: out, _ = subp(cmd) return out.strip() except ProcessExecutionError: pass return __VERSION__ def get_last_known_candidate() -> Optional[str]: # If we can't determine when the cache was updated for the last time, # We always assume it was as recent as possible - thus `inf`. last_apt_cache_update = get_apt_cache_time() or inf if ( not os.path.exists(CANDIDATE_CACHE_PATH) or os.stat(CANDIDATE_CACHE_PATH).st_mtime < last_apt_cache_update ): candidate_version = None try: policy = get_apt_cache_policy_for_package("ubuntu-advantage-tools") match = re.search(CANDIDATE_REGEX, policy) if match: candidate_version = match.group("candidate") os.makedirs(UAC_RUN_PATH, exist_ok=True) with open(CANDIDATE_CACHE_PATH, "w") as f: f.write(candidate_version) return candidate_version except Exception: if candidate_version is not None: return candidate_version try: with open(CANDIDATE_CACHE_PATH, "r") as f: return f.read().strip() except Exception: pass return None def check_for_new_version() -> Optional[str]: candidate = get_last_known_candidate() if candidate and compare_versions(candidate, get_version(), "gt"): return candidate return None
Close