mirror of
https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite.git
synced 2025-12-18 06:09:01 +00:00
update
This commit is contained in:
26
linPEAS/builder/src/peasLoaded.py
Normal file
26
linPEAS/builder/src/peasLoaded.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from .fileRecord import FileRecord
|
||||
from .peassRecord import PEASRecord
|
||||
from .yamlGlobals import YAML_LOADED, DEFAULTS
|
||||
|
||||
class PEASLoaded:
|
||||
def __init__(self):
|
||||
to_search = YAML_LOADED["search"]
|
||||
self.peasrecords = []
|
||||
for name,peasrecord_json in to_search.items():
|
||||
filerecords = []
|
||||
for regex,fr in peasrecord_json["files"].items():
|
||||
filerecords.append(
|
||||
FileRecord(
|
||||
regex=regex,
|
||||
**fr
|
||||
)
|
||||
)
|
||||
|
||||
self.peasrecords.append(
|
||||
PEASRecord(
|
||||
name=name,
|
||||
auto_check=peasrecord_json["config"]["auto_check"],
|
||||
exec=peasrecord_json["config"].get("exec", DEFAULTS["exec"]),
|
||||
filerecords=filerecords
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user