OSCP-Exam-Report-Template-Markdown
OSCP-Exam-Report-Template-Markdown copied to clipboard
Images Resize
While exporting using template 'eisvogel' all the images gets resized, even if they are small or big. See attached
Can you paste the associated markdown code?
Attaching some images too
Same problem here
See upstream issue, you need to either use an older version of eisvogel template as a workaround (2.4.2 or before, not latest 2.5.0), or for a proper fix to upgrade to a newer version of pandoc (3.2.1+, best 3.6.0).
The issue is nor OSERT, nor pandoc, nor eisvogel template, but ~~Jurassic Linux~~ ~~Museum OS~~ Debian, Ubuntu, Fedora or even ArchLinux have old versions of Pandoc previous to 3.2.1.
So download a newer bundle of pandoc: https://github.com/jgm/pandoc/releases
Thanks @noraj , l'll test and update this comment, in the meantime for the others in case it's useful:
❯ wget https://github.com/jgm/pandoc/releases/download/3.6/pandoc-3.6-1-amd64.deb
--2024-12-21 12:53:29-- https://github.com/jgm/pandoc/releases/download/3.6/pandoc-3.6-1-amd64.deb
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/571770/6652c4fe-ec13-4769-b437-eee96f1068a4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20241221%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241221T115331Z&X-Amz-Expires=300&X-Amz-Signature=27331e2beb7b2166ec3e9bef18909f8cff60ca6e305f97d73d14ae1528796732&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dpandoc-3.6-1-amd64.deb&response-content-type=application%2Foctet-stream [following]
--2024-12-21 12:53:31-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/571770/6652c4fe-ec13-4769-b437-eee96f1068a4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20241221%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241221T115331Z&X-Amz-Expires=300&X-Amz-Signature=27331e2beb7b2166ec3e9bef18909f8cff60ca6e305f97d73d14ae1528796732&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dpandoc-3.6-1-amd64.deb&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.110.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 32248406 (31M) [application/octet-stream]
Saving to: ‘pandoc-3.6-1-amd64.deb’
pandoc-3.6-1-amd64.deb 100%[======================================================================================================>] 30.75M 57.7MB/s in 0.5s
2024-12-21 12:53:37 (57.7 MB/s) - ‘pandoc-3.6-1-amd64.deb’ saved [32248406/32248406]
❯ sudo dpkg -i pandoc-3.6-1-amd64.deb
(Reading database ... 932299 files and directories currently installed.)
Preparing to unpack pandoc-3.6-1-amd64.deb ...
Unpacking pandoc (3.6-1) over (3.1.11.1+ds-2) ...
Setting up pandoc (3.6-1) ...
Processing triggers for kali-menu (2023.4.7) ...
Processing triggers for man-db (2.12.0-3) ...
❯ pandoc -v
pandoc 3.6
Features: +server +lua
Scripting engine: Lua 5.4
User data directory: /home/kali/.pandoc
Copyright (C) 2006-2024 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
Hi @noraj ,
I confirm that after updating to pandoc 3.6 issue about resize is resolved.
On the other hand it was pretty challenging with the following scenario 1- Notes taken with Notion 2- Exported to .md 3- Kali 2024.02
Issues found so far:
- .md contains characters not supported
- export of notion contains .webp images
- export of notion contains spaces between folders and files
Probably this should go into a separate section.
Some Work Arounds:
sed -i 's/■/*/g; s/✅/+/g; s/💡/!/g' M72.md\n
sed 's/─/-/g; s/㉿/X/g; s/└/\\/g; s/┌/\\\//g; s/■/[■]/g; s/❯/>/g' M7.md > M72.md\n
______
import os
def rename_images(directory):
for filename in os.listdir(directory):
if ' ' in filename: # check if the filename contains spaces
new_filename = filename.replace(' ', '_') # replace spaces with underscores
os.rename(os.path.join(directory, filename), os.path.join(directory, new_filename))
print(f'Renamed: {filename} -> {new_filename}')
# Specify the directory where the images are stored
rename_images('M7')
Probably there are more I can't remember, but repeating this process every time is not trivial or straightforward. Let me know if you are interested in the .md export from Notion, happy to share.
Thanks a lot for your support and for this great tool.