Created
June 18, 2026 08:56
-
-
Save afrendeiro/edda0906be30fe9446ead4d30b9d16c3 to your computer and use it in GitHub Desktop.
Check whether Arch-based system is compromised in latest AUR hack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| import subprocess | |
| import urllib.request | |
| installed = {line.split()[0] for line in subprocess.check_output(["pacman", "-Q"]).decode().splitlines()} | |
| html = urllib.request.urlopen("https://md.archlinux.org/s/SxbqukK6IA").read().decode() | |
| compromised = set("".join(re.findall(r">```\n(.*?)</div>\n", html, re.DOTALL)).split("\n")) | |
| if installed & compromised: | |
| print("System compromised.") | |
| else: | |
| print("No compromised packages currently installed.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment