Skip to content

Instantly share code, notes, and snippets.

View Lyceris-chan's full-sized avatar
😴
sleeping

Lacia~chan Lyceris-chan

😴
sleeping
  • Eichenwalde, Germany
View GitHub Profile
@Lyceris-chan
Lyceris-chan / denials.py
Created March 1, 2020 21:57 — forked from ProtoChuz/denials.py
Selinux Denial Fixer
# Denials Input : denials.txt | Fix Output : fixdenials.txt
import re
denres = ""
denlist = []
with open("denials.txt") as deninput:
denlines = deninput.readlines()
regex = {}
regex[0] = re.compile(r"scontext=u:r:(.*?):", re.IGNORECASE)
regex[1] = re.compile(r"tcontext=.*:(.*?):", re.IGNORECASE)