Current location: Hot Scripts Forums » General Community » Script Requests » Perl upload progress bar with these spec:


Perl upload progress bar with these spec:

Reply
  #1 (permalink)  
Old 02-23-07, 07:06 AM
scott2500uk's Avatar
scott2500uk scott2500uk is offline
Coding Addict
 
Join Date: Apr 2006
Posts: 275
Thanks: 2
Thanked 2 Times in 2 Posts
Perl upload progress bar with these spec:

I know there are a lot of perl and php based upload scripts out there E.G Magaupload and Uber Upload, but Im finding it real hard to modify these scripts to work for me. Now I must warn you that I know a very litle about Perl but well knowledgable in PHP.

This is what I want:

upload form. The form will allow 2 files to be inputed. Before the submit button can be pressed javascript will check the inputs firstly for invalid extensions. I know this can be bypassed but it an aditional measure to stop the attepmt of files being uploaded with wrong file extensions. (I can code all this part)

Once passed the form and submitted a popup window uploads the files with a progress meter. This popup should be in perl. The perl script should check for obvious no no's for extensions eg php asp etc Also in the perl script should be an upload size limit.

IF passes the checks again then the files being uploaded just be renamed to a random name and also have the extension .tmp added to the end. eg mypicture.jpg -> g8sh475h.jpg.tmp Once stored in an upload directory the popup closes and tell the original upload form (php page) that the file upload has finished and give the results back to that page to be then proccessed. from there further checks will be done on the file. Further file extension checks and filesize checks with possibly mine type checks. ( I can do that part)

Can any one recomend a perl upload script out there that would be able to achieve such thing with a slight modification? many the scripts Ive come across have loads of files when realisticly I want one file form the upload form and processing and one file which displays the upload progress.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 02-23-07, 07:18 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
I'm moving this to script requests...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 02-23-07, 06:58 PM
curbview.com's Avatar
curbview.com curbview.com is offline
Junior Code Guru
 
Join Date: May 2006
Posts: 555
Thanks: 0
Thanked 0 Times in 0 Posts
A file upload script of this nature is not hard to put together. I do suggest that you include A LOT MORE security checks than described... Checking extensions is only the beginning. Your upload script should verify that the file uploaded is indeed THAT file type. In other words, your Perl script should use some of the built in features to verify that a jpg file is really a photo. Word Docs are really Word docs... Etc., etc.

I highly suggest developing a customized uploader in Perl rather than depending on what is available at CPAN.org, but there are Perl modules that will accomplish what it is you want. (File renaming, temp directories, etc.)

The many modules that I have studied over the years have *problems* but they require a person who is really out to get you to exploit.

Your script should also verify that ONLY people you have given permission to (registered users, IP ADDRESS based, etc.) are allowed to upload anything.

Your script should only allow file names of say tr/a-zA-Z_0-9./

Your script should limit the number of characters in the file name.

Your script should not allow uploaded files to be viewed/hot-linked by outsiders.

Your script should be able to send you an email when a user uploads a file (Or at least keep a log of usage.

There are a few Major security checks but it borders *unethical* practices...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 03-03-07, 08:27 AM
scott2500uk's Avatar
scott2500uk scott2500uk is offline
Coding Addict
 
Join Date: Apr 2006
Posts: 275
Thanks: 2
Thanked 2 Times in 2 Posts
curbview.com thanks for replying but I am awear of the security risks and know what action is to be taken.

Firstly I said that I would do the checks with php all I what the perl script to do is upload rename and put the file in a folder so that the php can do the nessary checks on the file. The file will be going in to a folder that will have the deney all set to the folder. So firstly if a hacker did figure out the renamed file he wouldnt be able to access it. Secondly the file will have the extension .tmp added so the server wouldnt be able to run it and 3rdly the folder the file is being placed in will not be allowed script access so basically if a php file uploaded it wouldnt be able to run.

I hope now you understand I just want a simple perl script that will upload and rename and place in a folder and then report to my php script of its location and name.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 03-16-07, 05:04 PM
scott2500uk's Avatar
scott2500uk scott2500uk is offline
Coding Addict
 
Join Date: Apr 2006
Posts: 275
Thanks: 2
Thanked 2 Times in 2 Posts
any one...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Progress Bar naissa PHP 6 04-16-06 12:31 PM
Upload Progress Bar o2pb Script Requests 2 03-11-06 01:44 AM
you search a php upload progress bar ? gigi_online General Advertisements 6 02-01-06 01:39 PM
ASP upload prob minority ASP 1 06-27-05 09:35 AM
Avoid chaging the path to perl (shebang) on every upload to server uniqueuser Perl 2 04-19-05 03:27 PM


All times are GMT -5. The time now is 08:44 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.