Hi,
Is it possible to find out type of a file that don't have extension, for example exe, doc, pdf ,...?
Does type of a file keep any other place, for example in header of file?
If no, how can detect type of a file?
Hi,
Is it possible to find out type of a file that don't have extension, for example exe, doc, pdf ,...?
Does type of a file keep any other place, for example in header of file?
If no, how can detect type of a file?
On Windows you'd have to do a great deal of analysis of the file data. If you were only looking for two or three types then it might be possible, but if you wanted something generic to find the any filetype without the extension, it'd be incredibly difficult.
Some files have certain headers and magic numbers at the beginning of them. For example, all executable files on Windows contain the two letters "MZ" at the beginning of the file. Other files might start like this but there are other factors.
It really depends on what file formats you want to find, some have lots of information you can identify them by, others don't. You should open up some files of the same type in a hex editor to try and see some of the similarities (will be difficult without information of the headers).