Coder Social home page Coder Social logo

thomfre / oscp-exam-report-template Goto Github PK

View Code? Open in Web Editor NEW
33.0 5.0 17.0 35 KB

OSCP Exam Report Template in Markdown

Home Page: https://thomfre.github.io/OSCP-Exam-Report-Template/

License: MIT License

TeX 10.27% Shell 89.73%
oscp offensive-security report markdown pandoc oscp-tools exam template

oscp-exam-report-template's Introduction

OSCP-Exam-Report-Template

GitHub Issues Forks GitHub Stars License

This is my OSCP exam notes template, based on the fine work by noraj in his OSCP-Exam-Report-Template-Markdown (LICENSE)

This allow fast and efficient note writing during both the labs and the exam.

Instead of one huge report file, this template is based on several smaller markdown files, which are stitched together using MarkdownPP before generating the final report with Pandoc.

The report text is the whoisflynn improved version of the official PWK Example Report.

Requirements

Usage

  1. Start by making a new private repository from this template. Make sure you make it private
  2. Edit generate-package.sh and add your OS-ID to OSID="".
  3. Run install-tools.sh to install necessary tools and libraries (tested on ParrotOS), edit first if you don't want to install all of LaTeX.
  4. Edit the report.mdpp files and add your own information.
  5. Then simply write your report in markdown.
  6. Run generate-package.sh to generate report PDFs and report package.

Exercises and targets

Add exercises to the Lab/Exercises directory, save as .md files. Prefix the file with the chapter number, to ensure that the exercises will be included in the correct order.

Add targets in Lab/Targets and Exam/Targets, save as .md files.

Adjust to your needs

You can change the code syntax highlight theme by modifying --highlight-style in generate-report.sh.

Color sets

Well rendering color sets you can use in the template YAML:

titlepage-color titlepage-text-color titlepage-rule-color
DC143C (Crimson) FFFFFF (White) FFFFFF (White)
00FF7F (SpringGreen) 006400 DarkGreen 000000 (Black)
1E90FF (DodgerBlue) FFFAFA (Snow) FFFAFA (Snow)
483D8B (DarkSlateBlue) FFFAFA (Snow) FFFAFA (Snow)
FFD700 (Gold) 000000 (Black) 000000 (Black)
FFEFD5 (PapayaWhip) 000000 (Black) 000000 (Black)
FF8C00 (DarkOrange) 000000 (Black) 000000 (Black)
FFEF96 (no name) 50394C (no name) 50394C (no name)

VS Code

VS Code is a very good editor, and it is also a very good Markdown editor! The following extensions will make it even better (better for more than just Markdown):

Fonts

To make it even better, install Fira Code and Noto Color Emoji:

  • FiraCode - sudo apt install fonts-firacode
  • Noto Color Emoji - sudo apt install fonts-noto-color-emoji

VSCode settings.json

{
  "telemetry.enableTelemetry": false,
  "telemetry.enableCrashReporter": false,
  "editor.formatOnSave": true,
  "workbench.iconTheme": "vscode-icons",
  "editor.fontFamily": "Fira Code,Noto Color Emoji",
  "editor.fontSize": 14,
  "editor.fontLigatures": true,
  "markdown-pdf.executablePath": "/opt/google/chrome/chrome",
  "editor.codeActionsOnSave": {
    "source.fixAll.markdownlint": true
  }
}

Known issues

MarkdownPP has a bug that will break include statements inside C-code blocks. This bug has been fixed in this fork: https://github.com/miguelangelnieto/markdown-pp

Credits

Based on

noraj OSCP-Exam-Report-Template-Markdown ((LICENSE)): https://github.com/noraj/OSCP-Exam-Report-Template-Markdown

Inspired by

JohnHammond oscp-notetaking (UNLICENSED): https://github.com/JohnHammond/oscp-notetaking

Report Template

whoisflynn improved template v3.2 (UNLICENSED): https://github.com/whoisflynn/OSCP-Exam-Report-Template

Pandoc Template

Eisvogel (LICENSE): https://github.com/Wandmalfarbe/pandoc-latex-template

oscp-exam-report-template's People

Contributors

opsec-infosec avatar thomfre avatar thuizinga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

oscp-exam-report-template's Issues

C syntax highlighting is broken

Hello,

When I put some code in C like:

#define _LARGEFILE64_SOURCE
#define _GNU_SOURCE

Markdown-pp will generate a .md like this:

###define _LARGEFILE64_SOURCE
###define _GNU_SOURCE

And that is what appears in the final PDF.

Is there any workaround for this that doesn't involve escaping all characters for markdown-pp?

Thank you.

ASCII codec can't decode byte - Unable to Generate Report

Attempting to generate the lab report based upon my exercises and getting the following error. Generating the exam-report seems to work as expected.

Been going through my code from my BoF that I included wasn't sure if you had any other ideas.

root@kali:~/Desktop/oscp/OSCP-Exam-Lab-Reports# ./generate-report.sh lab-report
[*] Preparing lab report for generation
[*] Stitching together targets, appendices and exercises
[*] Correcting relative image URLs
[*] Generating report
Traceback (most recent call last):
  File "/usr/local/bin/markdown-pp", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/MarkdownPP/main.py", line 112, in main
    MarkdownPP.MarkdownPP(input=mdpp, output=md, modules=modules)
  File "/usr/local/lib/python2.7/dist-packages/MarkdownPP/MarkdownPP.py", line 28, in __init__
    pp.process()
  File "/usr/local/lib/python2.7/dist-packages/MarkdownPP/Processor.py", line 49, in process
    transforms = module.transform(self.data)
  File "/usr/local/lib/python2.7/dist-packages/MarkdownPP/Modules/Include.py", line 40, in transform
    includedata = self.include(match)
  File "/usr/local/lib/python2.7/dist-packages/MarkdownPP/Modules/Include.py", line 106, in include
    result += self.include_file(filename, pwd, shift)
  File "/usr/local/lib/python2.7/dist-packages/MarkdownPP/Modules/Include.py", line 74, in include_file
    data[linenum] = "#" + data[linenum]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 60: ordinal not in range(128)

PDF not compiling without code block

The commit Fixed issue with line breaks in code blocks introduces an error when there are no code blocks present in the file to compile. The error is as follows:

user@kali-64:~/Documents/OSCP-Exam-Report-Template$ ./generate-report.sh lab-report abc.pdf
[*] Preparing lab report for generation
[*] Stitching together targets, appendices and exercises
[*] Correcting relative image URLs
[*] Generating report
[*] Creating PDF
Error producing PDF.
! LaTeX Error: Command \AlertTok undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.328 \begin{document}

This showed up when running generate-report.sh from the original source. I work around it by creating a code block in the file Lab/Exercises/1.1.1 Exercise.md as follows:

# Exercise

Exercise here

```c
code here
```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.