Last active
March 6, 2021 12:37
-
-
Save MohitDabas/21a6f47b502bef2213ebfef68c829270 to your computer and use it in GitHub Desktop.
The Following code snippets find permission on paths found in autoruns sysinternal utils
This file contains 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 os | |
autoRunFileData=open('autorun.txt',encoding='utf-16').readlines() | |
count=1 | |
for line in autoRunFileData: | |
matches=re.findall(r'[a-zA-Z]:\\[\\\S|*\S]?.*$',line) | |
try: | |
path=matches[0].split('"\t')[0] | |
print(path) | |
os.system('accesschk64.exe -wvu "'+path+'"') | |
except Exception as e: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment