Hello all..
I will have to detect .exe folder in a drive for my Project .. what is the basic idea to do this ??
as i know.exe folder which we see is actually a file having folder icon ...
how can i check it ?
I think what he is trying to say is that sometimes viruses will name themselves something, but give themselves the "folder" icon so it looks like they are a folder (with show extensions turned off).
Oh, so you double click the folder (to open it) and it runs the virus? I see.
Well if you want to detect whether it's an executable file or not, you could try parsing the binary header. The windows executable format is called PE (portable executable). http://en.wikipedia.org/wiki/Portable_Executable
You could try and find something about the structure of a windows PE file and parse the header, to check if it's an executable file. If it is, you can do whatever you want.
I'm an idiot. Parsing a binary file's header is about the most backwards and braindead idea I've had all day.
You just need the dirent library so you can check if it's a directory or not, not the other way round!