Restructure code: split features into separate files
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
#import "pages.typ"
|
||||
#import "helper.typ"
|
||||
#import "addons/addons.typ"
|
||||
#import "pages/pages.typ"
|
||||
|
||||
#import "aux/placeholder.typ": placeholder, panicOnPlaceholder
|
||||
|
||||
// Project-specific variables
|
||||
#helper.panicOnPlaceholder.update(false)
|
||||
#let place = helper.placeholder("Düsseldorf")
|
||||
#let author = helper.placeholder("Martin \"maride\" Dessauer")
|
||||
#let targetFull = helper.placeholder("FooBar Dummy Lab")
|
||||
#let targetInSentence = helper.placeholder("the Dummy Lab")
|
||||
// ---
|
||||
#panicOnPlaceholder.update(false)
|
||||
#let place = placeholder("Düsseldorf")
|
||||
#let author = placeholder("Martin \"maride\" Dessauer")
|
||||
#let targetFull = placeholder("FooBar Dummy Lab")
|
||||
#let targetInSentence = placeholder("the Dummy Lab")
|
||||
#let reportType = placeholder("Penetration Test Report")
|
||||
|
||||
// Styling setup
|
||||
#set text(font: "Helvetica Neue")
|
||||
#show heading: it => {
|
||||
v(1em)
|
||||
@@ -16,50 +19,46 @@
|
||||
}
|
||||
#set heading(numbering: "1.1")
|
||||
#set par(justify: true)
|
||||
|
||||
// ----- Cover & Legal disclaimer(s) -----
|
||||
#pages.cover(targetFull, place, author,
|
||||
confidential: false, // set to true for a "CONFIDENTIAL" mark on the cover
|
||||
tlp: "red", // set to one of "RED", "AMBER+STRICT", "AMBER", "GREEN", "CLEAR", or none. See https://www.first.org/tlp/
|
||||
draft: true // set to true for a "DRAFT" mark on the cover
|
||||
)
|
||||
#pages.legal(author)
|
||||
|
||||
#set page(
|
||||
paper: "a4",
|
||||
background: none,
|
||||
margin: auto,
|
||||
numbering: "1",
|
||||
footer: text(size: 12pt, weight: "extralight")[
|
||||
#text(fill: silver, [Penetration Test Report #targetFull])
|
||||
#h(1fr)
|
||||
#context(
|
||||
text(fill: silver, counter(page).display("1 of 1", both: true))
|
||||
)
|
||||
]
|
||||
footer: context(if here().page() > 2 {
|
||||
text(size: 12pt, weight: "extralight")[
|
||||
#text(fill: silver, [#reportType #targetFull])
|
||||
#h(1fr)
|
||||
#context(
|
||||
text(fill: silver, counter(page).display("1 of 1", both: true))
|
||||
)
|
||||
]
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
// ----- Cover & Legal disclaimer(s) -----
|
||||
#pages.cover.render(targetFull, place, author, reportType,
|
||||
confidential: false, // set to true for a "CONFIDENTIAL" mark on the cover
|
||||
tlp: "amber+strict", // set to one of "RED", "AMBER+STRICT", "AMBER", "GREEN", "CLEAR", or none. See https://www.first.org/tlp/
|
||||
draft: true // set to true for a "DRAFT" mark on the cover
|
||||
)
|
||||
#pages.legal.render(author)
|
||||
|
||||
// ----- Table of contents -----
|
||||
#pages.toc()
|
||||
#pages.toc.render()
|
||||
#pagebreak()
|
||||
|
||||
// ----- Management Summary -----
|
||||
#pages.managementSummary(
|
||||
#pages.mgmtsum.render(
|
||||
target: targetFull,
|
||||
targetInSentence: targetInSentence,
|
||||
testFocus: helper.placeholder("external attackers in real-world scenarios"),
|
||||
testObject: helper.placeholder(lorem(30)),
|
||||
testScenario: helper.placeholder("black box test"),
|
||||
recommendation: helper.placeholder([Based on the results of this penetration test, #targetInSentence may be exposed to a production environment.])
|
||||
)
|
||||
#pagebreak()
|
||||
|
||||
// ----- Test Scope & Setup -----
|
||||
#pages.scopeAndSetup(
|
||||
target: targetFull,
|
||||
start: helper.placeholder("01.01.1970"),
|
||||
end: helper.placeholder("31.12.1970"),
|
||||
setup: helper.placeholder([Connection to #targetFull was made through a dedicated VPN connection. The inner IP address of the test device was 10.0.0.42.]),
|
||||
testFocus: placeholder("external attackers in real-world scenarios"),
|
||||
testObject: placeholder(lorem(30)),
|
||||
testScenario: placeholder("black box test"),
|
||||
recommendation: placeholder([Based on the results of this penetration test, #targetInSentence may be exposed to a production environment.]),
|
||||
start: placeholder("01.01.1970"),
|
||||
end: placeholder("31.12.1970"),
|
||||
setup: placeholder([Connection to #targetFull was made through a dedicated VPN connection. The inner IP address of the test device was 10.0.0.42.]),
|
||||
nodes: "
|
||||
subgraph stage1 {
|
||||
label=\"Connection\";
|
||||
@@ -87,12 +86,11 @@
|
||||
}
|
||||
",
|
||||
scope: (
|
||||
( type: "Address", content: helper.placeholder("10.23.42.1"), inScope: true ),
|
||||
( type: "Address", content: helper.placeholder("10.23.42.1"), inScope: true ),
|
||||
( type: "Address", content: helper.placeholder("2001:db8::2342"), inScope: true ),
|
||||
( type: "Domain", content: helper.placeholder("*.maride.inv"), inScope: true ),
|
||||
( type: "URL", content: helper.placeholder("secret.maride.inv/flag.txt"), inScope: false),
|
||||
( type: "URL", content: helper.placeholder("important.maride.inv/rickroll"), inScope: false)
|
||||
( type: "Address", content: placeholder("10.23.42.1"), inScope: true ),
|
||||
( type: "Address", content: placeholder("2001:db8::2342"), inScope: true ),
|
||||
( type: "Domain", content: placeholder("*.maride.inv"), inScope: true ),
|
||||
( type: "URL", content: placeholder("secret.maride.inv/flag.txt"), inScope: false),
|
||||
( type: "URL", content: placeholder("important.maride.inv/rickroll"), inScope: false)
|
||||
)
|
||||
)
|
||||
#pagebreak()
|
||||
@@ -107,10 +105,10 @@
|
||||
#context(
|
||||
[
|
||||
#((
|
||||
pages.boxAppendix(),
|
||||
pages.ciaAppendix(),
|
||||
if helper.hasCVSSTable.get() { pages.cvssAppendix() },
|
||||
if helper.usesTLP.get() { pages.tlpAppendix() }
|
||||
pages.boxes.render(),
|
||||
if addons.cia.isUsed.get() { addons.cia.appendix() },
|
||||
if addons.cvss.isUsed.get() { addons.cvss.appendix() },
|
||||
if addons.tlp.isUsed.get() { addons.tlp.appendix() }
|
||||
).join(pagebreak()))
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user