-
Notifications
You must be signed in to change notification settings - Fork 0
/
snippets.vim
121 lines (104 loc) · 3.02 KB
/
snippets.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
global !p
def choice(string, choices):
if string:
choices = [s[len(string):] for s in choices if s.startswith(string)]
if len(choices) == 1:
return choices[0]
else:
return "(" + '|'.join(choices) + ")"
endglobal
snippet findingsec "Section for a Finding"
% Subsection for finding $1
\subsection{${1:Name} (${2:Critical/High/Moderate/Low/Informational})}
\begin{table}[htpb]
\centering
\begin{tabular}{|p{3cm}|p{9cm}|}
\hline
\cellcolor{heading-grey}\textbf{Description:} &
% Description ---
${4:Description} \\\\ \hline
% ---------------
\cellcolor{heading-grey}\textbf{Impact:} & \cellcolor{$2}$2 \\\\ \hline
\cellcolor{heading-grey} \textbf{System:} &
% Affected Systems ---
${5:SYSTEMS} \\\\ \hline
% --------------------
\cellcolor{heading-grey} \textbf{References:} &
% References ---
${6:References} \\\\ \hline
% --------------
\end{tabular}
\end{table}
\subsubsection{Exploitation Proof of Concept}%
% PoC text ---
${7:PoC Text}
% ------------
\subsubsection{Remediation}
\begin{longtable}[htpb]{|p{2cm}|p{12cm}|}
\hline
\cellcolor{dark-green}\textbf{Who:} &
% Responsible Team ---
${8:Team} \\\\ \hline
% --------------------
\cellcolor{dark-green}\textbf{Vector:} &
% Vector ---
${9:Local/Remote} \\\\ \hline
% ----------
\multicolumn{2}{|l|}{\cellcolor{dark-green} \textbf{Actions:}} \\\\ \hline
% Actions ---
1 & ${10:ACTION1} \\\\ \hline
% -----------
\end{longtable}
\pagebreak
$0
endsnippet
snippet findingseccolor "Section for a Finding with colored text"
% Subsection for finding $1
\subsection{\textcolor{$2}{${1:Name} (${2:Critical/High/Moderate/Low/Informational})}}
\begin{table}[htpb]
\centering
\begin{tabular}{|p{3cm}|p{9cm}|}
\hline
\cellcolor{heading-grey}\textbf{Description:} &
% Description ---
${4:Description} \\\\ \hline
% ---------------
\cellcolor{heading-grey}\textbf{Impact:} & \cellcolor{$2}$2 \\\\ \hline
\cellcolor{heading-grey} \textbf{System:} &
% Affected Systems ---
${5:SYSTEMS} \\\\ \hline
% --------------------
\cellcolor{heading-grey} \textbf{References:} &
% References ---
${6:References} \\\\ \hline
% --------------
\end{tabular}
\end{table}
\subsubsection{Exploitation Proof of Concept}%
% PoC text ---
${7:PoC Text}
% ------------
\subsubsection{Remediation}
\begin{longtable}[htpb]{|p{2cm}|p{12cm}|}
\hline
\cellcolor{dark-green}\textbf{Who:} &
% Responsible Team ---
${8:Team} \\\\ \hline
% --------------------
\cellcolor{dark-green}\textbf{Vector:} &
% Vector ---
${9:Local/Remote} \\\\ \hline
% ----------
\multicolumn{2}{|l|}{\cellcolor{dark-green} \textbf{Actions:}} \\\\ \hline
% Actions ---
1 & ${10:ACTION1} \\\\ \hline
% -----------
\end{longtable}
\pagebreak
$0
endsnippet
snippet findingref "List of references (links)"
\begin{itemize}
\item \href{${1:url}}{${2:link}} - ${3:description}
\end{itemize}
endsnippet