Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions denials.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def gen_fix(string):
if not os.path.isfile(logname):
print("Dmesg file is missing! Exiting.")
sys.exit()
os.system('cat %s | grep "avc: denied" > denials.txt' % logname)
os.system('cat %s | grep "avc: denied" > denials.txt' % logname)

if args.logcat is None or logname is None:
print("Parsing denials from logcat!")
Expand All @@ -122,12 +122,12 @@ def gen_fix(string):
if not os.path.isfile(logname):
print("Logcat file is missing! Exiting.")
sys.exit()
os.system('cat %s | grep "avc: denied" > denials.txt' % logname)
os.system('cat %s | grep "avc: denied" > denials.txt' % logname)

if args.sanitize:
print("Sanitizing file encoding!")
os.system('dos2unix %s' % logname)
os.system('cat %s | grep "avc: denied" > denials.txt' % logname)
os.system('cat %s | grep "avc: denied" > denials.txt' % logname)

if not os.path.isfile(inputfile):
print("Denials file is missing! Exiting.")
Expand Down