Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from subprocess import run
- def installed(packages: set[str]) -> set[str]:
- proc = run(["pacman", "-Q"], capture_output=True, encoding="utf8")
- return {
- line.split(maxsplit=1)[0].strip() for line in
- proc.stdout.splitlines()
- } & packages
- malware_packages = {
- # false positive test
- # "linux",
- # "mc",
- "librewolf-fix-bin",
- "firefox-patch-bin",
- "zen-browser-patched-bin",
- "minecraft-cracked",
- "ttf-ms-fonts-all",
- "vesktop-bin-patched",
- }
- if installed_packages := " ".join(installed(malware_packages)):
- print("❌You are fucked!!!❌\n\nUninstall following packages with pacman:\n")
- print(f"pacman -R {installed_packages}")
- else:
- print("🆗 You're safe. 🆗\n\nFollowing packages are not installed:\n", "\n".join(malware_packages), sep="\n")