Skip to content

Commit

Permalink
Bypass windows permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
nullmonk committed Feb 16, 2024
1 parent 8875fc0 commit 0a85dfe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tavern/tomes/file_tree/main.eldritch
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
block_list = ["/proc","/sys","/lib","/libx32","/lib32","/lib64","/boot","/srv","/usr","/snap","/run","/dev","/cores"]

usernfo = sys.get_user()
windows = sys.get_os().get("platform", "") == "PLATFORM_WINDOWS"

def can_read(f):
"""Return true if the user can read this dir/file
"""
# Bypass until windows perms are implemented
if windows:
return True

PERM_READ = 4
f_user = int(f["permissions"][-3]) # User byte
f_group = int(f["permissions"][-2]) # Group byte
Expand Down

0 comments on commit 0a85dfe

Please sign in to comment.