I have an file upload form and need to run a check on the file uploaded to ensure it isn't anything that might potentially cause problems on the server (ie: executables). The files will primarily be images, but I will be dealing with a other exentions of raw file formats which can be many different extensions. so, i feel the easiest way is to check agaisn't a list of things I don't want, rather than things i do.
What is the best way to do this? Ideally something that will work on a both a windows and linux server, but primarily linux if now both.