mirror of
https://github.com/carlospolop/PEASS-ng
synced 2025-03-25 05:46:23 +01:00
html and pdf
This commit is contained in:
parent
b3c12e22b6
commit
33f4ca923c
@ -21,6 +21,9 @@ These tools search for possible **local privilege escalation paths** that you co
|
|||||||
## Quick Start
|
## Quick Start
|
||||||
Find the **latest versions of all the scripts and binaries in [the releases page](https://github.com/carlospolop/PEASS-ng/releases/latest)**.
|
Find the **latest versions of all the scripts and binaries in [the releases page](https://github.com/carlospolop/PEASS-ng/releases/latest)**.
|
||||||
|
|
||||||
|
## JSON, HTML & PDF output
|
||||||
|
Check the **[parsers](./parsers/)** directory to **transform PEASS outputs to JSON, HTML and PDF**
|
||||||
|
|
||||||
## Let's improve PEASS together
|
## Let's improve PEASS together
|
||||||
|
|
||||||
If you want to **add something** and have **any cool idea** related to this project, please let me know it in the **telegram group https://t.me/peass** or contribute reading the **[CONTRIBUTING.md](https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/blob/master/CONTRIBUTING.md)** file.
|
If you want to **add something** and have **any cool idea** related to this project, please let me know it in the **telegram group https://t.me/peass** or contribute reading the **[CONTRIBUTING.md](https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/blob/master/CONTRIBUTING.md)** file.
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
# Privilege Escalation Awesome Scripts JSON exporter
|
# Privilege Escalation Awesome Scripts Parsers
|
||||||
|
|
||||||
This script allows you to transform the output of linpeas/macpeas/winpeas to JSON.
|
These scripts allows you to transform the output of linpeas/macpeas/winpeas to JSON and then to PDF and HTML.
|
||||||
|
|
||||||
```python3
|
```python3
|
||||||
python3 peass-parser.py </path/to/executed_peass> </path/to/output_peass.json>
|
python3 peass2json.py </path/to/executed_peass.out> </path/to/peass.json>
|
||||||
|
python3 json2pdf.py </path/to/peass.json> </path/to/peass.pdf>
|
||||||
|
python3 json2html.py </path/to/peass.json> </path/to/peass.html>
|
||||||
```
|
```
|
||||||
|
|
||||||
This script is still in beta version and has been tested only with linpeas output.
|
|
||||||
|
|
||||||
## Format
|
## JSON Format
|
||||||
Basically, **each section has**:
|
Basically, **each section has**:
|
||||||
- Infos (URLs or info about the section)
|
- Infos (URLs or info about the section)
|
||||||
- Text lines (the real text info found in the section, colors included)
|
- Text lines (the real text info found in the section, colors included)
|
||||||
@ -75,4 +76,4 @@ There can also be a `<Third level Section Name>`
|
|||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
|
|
||||||
I'm looking for **someone that could create HTML and PDF reports** from this JSON.
|
- **PRs improving the code and the aspect of the final PDFs and HTMLs are always welcome!**
|
347
parsers/json2html.py
Normal file
347
parsers/json2html.py
Normal file
File diff suppressed because one or more lines are too long
@ -156,7 +156,7 @@ if __name__ == "__main__":
|
|||||||
JSON_PATH = sys.argv[1]
|
JSON_PATH = sys.argv[1]
|
||||||
PDF_PATH = sys.argv[2]
|
PDF_PATH = sys.argv[2]
|
||||||
except IndexError as err:
|
except IndexError as err:
|
||||||
print("Error: Please pass the peas.json file and the path to save the pdf\n./json2pdf.py <json_file> <pdf_file.pdf>")
|
print("Error: Please pass the peas.json file and the path to save the pdf\njson2pdf.py <json_file> <pdf_file.pdf>")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
main()
|
main()
|
@ -90,7 +90,7 @@ def clean_colors(line: str) -> str:
|
|||||||
for reg in re.findall(r'\x1b\[[^a-zA-Z]+\dm', line):
|
for reg in re.findall(r'\x1b\[[^a-zA-Z]+\dm', line):
|
||||||
line = line.replace(reg,"")
|
line = line.replace(reg,"")
|
||||||
|
|
||||||
line = line.replace('\x1b',"").replace("[0m", "") #Sometimes that byte stays
|
line = line.replace('\x1b',"").replace("[0m", "").replace("[3m", "") #Sometimes that byte stays
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
return line
|
return line
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ if __name__ == "__main__":
|
|||||||
OUTPUT_PATH = sys.argv[1]
|
OUTPUT_PATH = sys.argv[1]
|
||||||
JSON_PATH = sys.argv[2]
|
JSON_PATH = sys.argv[2]
|
||||||
except IndexError as err:
|
except IndexError as err:
|
||||||
print("Error: Please pass the peas.out file and the path to save the json\n./peas-parser.py <output_file> <json_file.json>")
|
print("Error: Please pass the peas.out file and the path to save the json\npeas2json.py <output_file> <json_file.json>")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
main()
|
main()
|
Loading…
x
Reference in New Issue
Block a user