Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fact_pdf_report
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
fact_pdf_report
Commits
32e185a3
Commit
32e185a3
authored
May 11, 2020
by
lwilms
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small steps at a time
parent
d43ccd2b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
10 deletions
+33
-10
main.tex
pdf_generator/templates/new_template/main.tex
+16
-9
template_engine.py
pdf_generator/tex_generation/template_engine.py
+17
-1
No files found.
pdf_generator/templates/new_template/main.tex
View file @
32e185a3
...
...
@@ -40,10 +40,11 @@
%----------------------------------------------------------------------------------------
\aboutme
{
PKCS8 Private Key
\\
SSL Certificate
\\
SSH-RSA Private Key Block
\\
Generic Public Key
\BLOCK
{
if 'crypto
_
material' in analysis
}
\BLOCK
{
for selected
_
summary in analysis['crypto
_
material']['summary']
}
\VAR
{
selected
_
summary | filter
_
chars
}
\\
\BLOCK
{
endfor
}
\BLOCK
{
endif
}
}
% To have no About Me section, just remove all the text and leave \aboutme{}
%----------------------------------------------------------------------------------------
...
...
@@ -51,8 +52,12 @@ Generic Public Key
%----------------------------------------------------------------------------------------
% Skill bar section, each skill must have a value between 0 an 6 (float)
\skills
{{
NX/5.96
}
,
{
Canary/0.01
}
,
{
PIE/3.82
}
,
{
RELRO/0.13
}}
\skills
{
\BLOCK
{
for selected
_
summary in analysis['exploit
_
mitigations']['summary']
}
{
\VAR
{
selected
_
summary | filter
_
chars
}
/6
}
,
\BLOCK
{
endfor
}
{}
}
%------------------------------------------------
% Skill text section, each skill must have a value between 0 an 6
...
...
@@ -68,10 +73,12 @@ Generic Public Key
%----------------------------------------------------------------------------------------
\section
{
Binwalk
}
\BLOCK
{
if analysis['entropy
_
analysis
_
graph']
}
\subsection
{
Entropy Graph
}
\includegraphics
[width = \textwidth]
{
/tmp/interface/data/entropy
_
analysis
_
graph.png
}
\subsection
{
Entropy Graph
}
%\includegraphics[width = \textwidth]{/tmp/interface/data/entropy_analysis_graph.png}
\includegraphics
[width = \textwidth]
{
\VAR
{
analysis['entropy
_
analysis
_
graph'] | base64
_
to
_
png('entropy
_
analysis
_
graph', tmp
_
dir)
}}
\BLOCK
{
endif
}
%\begin{twenty} % Environment for a list with descriptions
% \twentyitem{since 1865}{Ph.D. {\normalfont candidate in Computer Science}}{Wonderland}{\emph{A Quantified Theory of Social Cohesion.}}
...
...
pdf_generator/tex_generation/template_engine.py
View file @
32e185a3
...
...
@@ -13,7 +13,7 @@ MAIN_TEMPLATE = 'main.tex'
META_TEMPLATE
=
'meta.tex'
CUSTOM_TEMPLATE_CLASS
=
'twentysecondcv.cls'
PLUGIN_TEMPLATE_BLUEPRINT
=
'{}.tex'
LOGO_FILE
=
'
/new_template/
fact.png'
LOGO_FILE
=
'fact.png'
def
render_number_as_size
(
number
,
verbose
=
True
):
...
...
@@ -45,6 +45,7 @@ def replace_special_characters(data):
latex_character_escapes
=
OrderedDict
()
latex_character_escapes
[
'
\\
'
]
=
''
latex_character_escapes
[
'
\'
'
]
=
''
latex_character_escapes
[
'/'
]
=
' '
latex_character_escapes
[
'$'
]
=
'
\\
$'
latex_character_escapes
[
'('
]
=
'$($'
latex_character_escapes
[
')'
]
=
'$)$'
...
...
@@ -101,6 +102,21 @@ def item_contains_string(item, string):
return
string
in
item
def
count_mitigations
(
exploit_mitigations
):
count
=
0
if
'Canary'
in
exploit_mitigations
[
'summary'
]:
for
selected_summary
in
exploit_mitigations
:
if
'Canary'
in
selected_summary
:
count
+=
len
(
selected_summary
)
elif
'NX'
in
exploit_mitigations
[
'summary'
]:
pass
elif
'RELRO'
in
exploit_mitigations
[
'summary'
]:
pass
elif
'PIE'
in
exploit_mitigations
[
'summary'
]:
pass
return
count
def
create_jinja_environment
(
templates_to_use
=
'default'
):
template_directory
=
Path
(
Path
(
__file__
)
.
parent
.
parent
,
'templates'
,
templates_to_use
)
environment
=
jinja2
.
Environment
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment