php upload

by Daganev

Back to The Real World.

Daganev2006-05-15 22:26:09
Can anyone help me find a script to ensure that viruses and other hostile code doesn't get uploaded to my email using PHP upload and HTML forms?


I don't feel like reinventing the wheel.
Bastion2006-05-15 22:48:08
Are you talking something that just limits the types of file extensions that can be uploaded or something that actually scans uploaded files before emailing them to the set email address?
Daganev2006-05-15 22:56:30
Just checking the file extensions...

I know its easy to do, but the amount of extensions are so many I'd hate to retype all that.

This seems like a basic thing that anybody who allows uploaded files would need...
Bastion2006-05-15 23:02:48
Well, lets see, here's an old list I have, pretty concise though:

ade - Access Project Extension
adp - Access Project file
bas - BASIC program
bat - DOS batch file script
chm - Compiled HTML file
cmd - 1st Reader External Command Menu
com - Command file (program)
cpl - Control Panel Module
crt - Certificate file
eml - Outlook Express message
exe - Executable file (program)
hlp - Windows help file
hta - HTML file
inf - package information file
ins - Install script
isp - Sign-up file(X-Internet)
jse - ######?
lnk - Shortcut file (Windows)
mdb - Access database
mde - Access file
msc - Common console document (Windows 2000)
msi - Installer program
msp - Windows Installer patch file
mst - Windows Installer transform
pcd - P-Code compiled test scripts
pif - Program information file (Win 3.1)
rar - archive format - banned temprarily 22/12/05.
reg - Registration file
scr - Screen saver
sct - FoxPro forms
shs - Shell scrap file
url - Internet shortcut file (Universal Resource locatior)
vbs - Visual Basic program
vbe - Visual Basic related
wsf
wsh
wsc

hotscripts.com has some pretty simple/non bulky free scripts. I found this one right away, basic and should do what you want, though I only glanced at it. http://www.hotscripts.com/Detailed/55586.html
Daganev2006-05-15 23:06:49
Perfect... thank you.

never knew about hotscripts.com thanks.

I just knew somebody had to have done this allready.
Bastion2006-05-15 23:31:19
No worries. I'm assuming you know php already, but if you have any troubles, feel free to ask