Is there any way to find the exact extension of File.For example if the extension is .csv, somebody changed the extension manually into .xlsx(e.g. Changing of .csv extension manually in desktop into .pdf).where .Now file extension will be changed in to .xlsx format but content are belong to .csv format.So there is any way to find such kind of malicious file in C#. Below code get the file extension,but it doesn't know whether the file extension is changed manually or not
Path.GetExtension(Be.FileName).ToLower().Contains(".csv")
I want to check both content type extension and also file extension.Since some intruder may change the file extension into extension that we want.But file content may belong to different extension.Since above code find only the filename extension and not content exact Extension.
Do we have any other property in CSVhelper for find such kind of file.
Can anyone help on this?