mirror of
https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite.git
synced 2025-12-08 10:01:29 +00:00
Compare commits
1 Commits
codex/find
...
codex/repl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5e3c2a885 |
@@ -33,7 +33,7 @@ if __name__ == "__main__":
|
|||||||
parser.add_argument('--small', action='store_true', help='Build small version of linpeas.')
|
parser.add_argument('--small', action='store_true', help='Build small version of linpeas.')
|
||||||
parser.add_argument('--include', type=str, help='Build linpeas only with the modules indicated you can indicate section names or module IDs).')
|
parser.add_argument('--include', type=str, help='Build linpeas only with the modules indicated you can indicate section names or module IDs).')
|
||||||
parser.add_argument('--exclude', type=str, help='Exclude the given modules (you can indicate section names or module IDs).')
|
parser.add_argument('--exclude', type=str, help='Exclude the given modules (you can indicate section names or module IDs).')
|
||||||
parser.add_argument('--output', required=True, type=str, help='Parth to write the final linpeas file to.')
|
parser.add_argument('--output', required=True, type=str, help='Path to write the final linpeas file to.')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
all_modules = args.all
|
all_modules = args.all
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ def parse_line(line: str):
|
|||||||
|
|
||||||
global FINAL_JSON, C_SECTION, C_MAIN_SECTION, C_2_SECTION, C_3_SECTION
|
global FINAL_JSON, C_SECTION, C_MAIN_SECTION, C_2_SECTION, C_3_SECTION
|
||||||
|
|
||||||
|
if "Cron jobs" in line:
|
||||||
|
a=1
|
||||||
|
|
||||||
if is_section(line, TITLE1_PATTERN):
|
if is_section(line, TITLE1_PATTERN):
|
||||||
title = parse_title(line)
|
title = parse_title(line)
|
||||||
@@ -143,26 +145,17 @@ def parse_line(line: str):
|
|||||||
|
|
||||||
|
|
||||||
def parse_peass(outputpath: str, jsonpath: str = ""):
|
def parse_peass(outputpath: str, jsonpath: str = ""):
|
||||||
global OUTPUT_PATH, JSON_PATH, FINAL_JSON, C_SECTION, C_MAIN_SECTION, C_2_SECTION, C_3_SECTION
|
global OUTPUT_PATH, JSON_PATH
|
||||||
|
|
||||||
OUTPUT_PATH = outputpath
|
OUTPUT_PATH = outputpath
|
||||||
JSON_PATH = jsonpath
|
JSON_PATH = jsonpath
|
||||||
|
|
||||||
# Reset globals to avoid data leaking between executions
|
for line in open(OUTPUT_PATH, 'r', encoding="utf8").readlines():
|
||||||
FINAL_JSON = {}
|
line = line.strip()
|
||||||
C_SECTION = FINAL_JSON
|
if not line or not clean_colors(line): #Remove empty lines or lines just with colors hex
|
||||||
C_MAIN_SECTION = FINAL_JSON
|
continue
|
||||||
C_2_SECTION = FINAL_JSON
|
|
||||||
C_3_SECTION = FINAL_JSON
|
|
||||||
|
|
||||||
with open(OUTPUT_PATH, 'r', encoding="utf8") as f:
|
parse_line(line)
|
||||||
for line in f.readlines():
|
|
||||||
line = line.strip()
|
|
||||||
# Remove empty lines or lines containing only color codes
|
|
||||||
if not line or not clean_colors(line):
|
|
||||||
continue
|
|
||||||
|
|
||||||
parse_line(line)
|
|
||||||
|
|
||||||
if JSON_PATH:
|
if JSON_PATH:
|
||||||
with open(JSON_PATH, "w") as f:
|
with open(JSON_PATH, "w") as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user