Skip to content

Commit

Permalink
fix: Added / fixed PDF file signatures
Browse files Browse the repository at this point in the history
- Used random online PDFs to verify
  • Loading branch information
its-laika authored and cus-dbc-laika committed Aug 21, 2024
1 parent 60b4670 commit 90f3952
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions MagicBytesValidator/Formats/Pdf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ public Pdf() : base(
StartsWith([0x25, 0x50, 0x44, 0x46, 0x2D])
.EndsWithAnyOf(
[
[0x0A, 0x25, 0x25, 0x25, 0x45, 0x4F, 0x46],
[0x0A, 0x25, 0x25, 0x45, 0x4F, 0x46],
[0x0A, 0x25, 0x25, 0x45, 0x4F, 0x46, 0x0A],
[0x0A, 0x25, 0x25, 0x45, 0x4F, 0x46, 0x0A, 0x20],
[0x0D, 0x0A, 0x25, 0x25, 0x45, 0x4F, 0x46, 0x0D, 0x0A],
[0x0D, 0x25, 0x25, 0x45, 0x4F, 0x46, 0x0D],
[0x20, 0x0a, 0x25, 0x25, 0x45, 0x4f, 0x46, 0x0d, 0x0a]
[0x0D, 0x25, 0x25, 0x45, 0x4F, 0x46, 0x0D], /* looks strange, but garykessler says so. */
[0x0A, 0x25, 0x25, 0x45, 0x4F, 0x46, 0x0D, 0x0A],
]);
}
}

0 comments on commit 90f3952

Please sign in to comment.