1

I have a requirement where i have to validate whether malicious content or scripts exist in PDF file before uploading.

I am checking the file extension, headers and mime types, but not able to check the content of the file for malicious content or scripts.

Mohiddin K
  • 11
  • 2
  • Here is a thead with the same issue: https://stackoverflow.com/questions/39638114/scan-uploaded-files-c-sharp-asp-net – Thomas Koelle Sep 19 '18 at 12:40
  • @ThomasKoelle thanks for the reply.. I cant use the Api or any other third party tool. Is there anyway to check in C# code itself. Pl let me know – Mohiddin K Sep 20 '18 at 07:52
  • If you are not allowed to include NuGet packages like AvScan into your own code then I will say it would be very hard. My other suggest would have been to remove all scripts in pdf file using iTextSharp, but that is also a 3rd party Nuget. – Thomas Koelle Sep 20 '18 at 08:21

0 Answers0