3v4l.org

run code in 300+ PHP versions simultaneously
<? /* //================================================================================ * phphq.Net Custom PHP Scripts * //================================================================================ :- Script Name: phUploader :- Version: 1.3 :- Release Date: June 23rd 2004 :- Last Updated: Jan 23 2010 :- Author: Scott Lucht <scott@phphq.net> http://www.phphq.net :- Copyright (c) 2010 All Rights Reserved :- :- This script is free software; you can redistribute it and/or modify :- it under the terms of the GNU General Public License as published by :- the Free Software Foundation; either version 2 of the License, or :- (at your option) any later version. :- :- This script is distributed in the hope that it will be useful, :- but WITHOUT ANY WARRANTY; without even the implied warranty of :- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the :- GNU General Public License for more details. :- http://www.gnu.org/licenses/gpl.txt :- //================================================================================ * Description //================================================================================ :- phUploader is a script for uploading single or multiple images or files to your website. You can specify your :- own file extensions that are accepted, the file size and naming options. This script was built and tested on :- IIS6/7 and Apache 2+. It's recommended to use php 5.1+ This script is very useful for temporary file :- storage or simple sig and avatar hosting. //================================================================================ * Setup //================================================================================ :- To setup this script, upload phUploader.php to a folder on your server. Create a new folder named uploads :- and chmod it to 777. Edit the variables below to change how the script acts. Please read the notes if you :- don't understand something. //================================================================================ * Change log //================================================================================ :- Version 1.0 :- 1) Initial Release :- Version 1.1 :- 1) Minor bug fixes :- 2) Enabled multiple file uploads :- Version 1.2 :- 1) Added CSS styling :- 2) Removed automatic creation of file upload folder. :- 3) Improved cookie security by hashing password and storing it within the cookie for authentication. :- 4) Minor bug fixes :- Version 1.3 :- 1) Re-write of many core functions to increase security. :- 2) Patched a vulnerability that allowed a remote attacker to upload a file with two extensions and then :- remotely execute the script on a vulnerable web server. <http://www.securityfocus.com/bid/25405> :- 3) New feature allows files that pass validation to be uploaded while files that fail validation are not :- uploaded without rejecting to whole group of files. :- 4) Fixed a flaw that allowed files with blank names or un-sanitized names to be uploaded which may :- cause issues for some users. :- 5) Minor bug fixes //================================================================================ * Frequently Asked Questions //================================================================================ :- Q1: I always get an error that the files were not uploaded. IE: GENERAL ERROR :- 1) Make sure you have CHMOD your "uploads" folder to 777 using your FTP client or similar. If you do :- not know how to do this ask your hosting provider. :- 2) Make sure the uploads folder actually exists. This is the second most common mistake aside from :- improper permissions. :- 3) If you are having problems uploading after you have chmod the uploads folder 777, try using the :- full server path in $fullpath below. If you do not know this ask your host. :- 4) Make sure "file_uploads" is set to ON in php.ini :- :- Q2: The page takes long to load and then gives me a page cannot be displayed or a blank page. :- 1) This is usually due to a low value in php.ini for "max_execution_time". :- 2) A newer ini setting "max_file_uploads" in php 5.2.12 was added which may be limiting the number of simultaneous uploads. :- 3) Your "upload_max_filesize" and "post_max_size" in php.ini might be set to low. :- :- Q3: How do I edit the colors of the form? :- 1) You will need to edit the CSS near the bottom of the script to change the looks and colors of the form. :- Check http://www.w3schools.com/css/default.asp for more information on CSS. :- :- Q4: Can I remove your copyright link? :- 1) I can't physically stop you. However, I really appreciate it when people leave it intact. :- Some people donate $5, $10, $20 to take it off. :- :- Q5: You never respond to my emails or to my questions in your forums! :- 1) I'm a very busy guy. I'm out of town a lot, and at any given time I have several projects going on. :- I get a lot of emails about this script, not to mention my other ones. :- 2) I only understand English. If your English is very bad please write in your native language and then :- translate it to English using <http://babelfish.altavista.com/babelfish/tr>. :- 3) If you are going to contact me, describe the issue you are having as completly as possible. :- "dude me form don't work see it at blah.com what's wrong??!?!" will get no response, ever. Write :- in detail what the problem is. Spend a minute on it, and maybe I'll take some of my time to reply. :- /* //================================================================================ * ! ATTENTION ! //================================================================================ :- Please read the above FAQ before giving up or emailing me. It may sort out your problems! */ // Max size PER file in KB $max_file_size="512"; // Max size for all files COMBINED in KB $max_combined_size="2048"; //Maximum file uploades at one time $file_uploads="4"; //The name of your website $websitename="Your site name"; // Full browser accessable URL to where files are accessed. With trailing slash. $full_url="http://YOUR_SITE/uploads/"; // Path to store files on your server If this fails use $fullpath below. With trailing slash. $folder="./uploads/"; // Use random file names? true=yes (recommended), false=use original file name. // Random names will help prevent files being denied because a file with that name already exists. $random_name=true; // Types of files that are acceptiable for uploading. Keep the array structure. $allow_types=array("jpg","gif","png","zip","rar","txt","doc"); // Only use this variable if you wish to use full server paths. Otherwise leave this empty. With trailing slash. $fullpath=""; //Use this only if you want to password protect your upload form. $password=""; /* //================================================================================ * ! ATTENTION ! //================================================================================ : Don't edit below this line. */ // Initialize variables $password_hash=md5($password); $error=""; $success=""; $display_message=""; $file_ext=array(); $password_form=""; // Function to get the extension a file. function get_ext($key) { $key=strtolower(substr(strrchr($key, "."), 1)); $key=str_replace("jpeg","jpg",$key); return $key; } // Filename security cleaning. Do not modify. function cln_file_name($string) { $cln_filename_find=array("/\.[^\.]+$/", "/[^\d\w\s-]/", "/\s\s+/", "/[-]+/", "/[_]+/"); $cln_filename_repl=array("", ""," ", "-", "_"); $string=preg_replace($cln_filename_find, $cln_filename_repl, $string); return trim($string); } // If a password is set, they must login to upload files. If($password) { //Verify the credentials. If($_POST['verify_password']==true) { If(md5($_POST['check_password'])==$password_hash) { setcookie("phUploader",$password_hash); sleep(1); //seems to help some people. header("Location: http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']); exit; } } //Show the authentication form If($_COOKIE['phUploader']!=$password_hash) { $password_form="<form method=\"POST\" action=\"".$_SERVER['PHP_SELF']."\">\n"; $password_form.="<table align=\"center\" class=\"table\">\n"; $password_form.="<tr>\n"; $password_form.="<td width=\"100%\" class=\"table_header\" colspan=\"2\">Password Required</td>\n"; $password_form.="</tr>\n"; $password_form.="<tr>\n"; $password_form.="<td width=\"35%\" class=\"table_body\">Enter Password:</td>\n"; $password_form.="<td width=\"65%\" class=\"table_body\"><input type=\"password\" name=\"check_password\" /></td>\n"; $password_form.="</tr>\n"; $password_form.="<td colspan=\"2\" align=\"center\" class=\"table_body\">\n"; $password_form.="<input type=\"hidden\" name=\"verify_password\" value=\"true\">\n"; $password_form.="<input type=\"submit\" value=\" Verify Password \" />\n"; $password_form.="</td>\n"; $password_form.="</tr>\n"; $password_form.="</table>\n"; $password_form.="</form>\n"; } } // If Password // Dont allow submit if $password_form has been populated If(($_POST['submit']==true) AND ($password_form=="")) { //Tally the size of all the files uploaded, check if it's over the ammount. If(array_sum($_FILES['file']['size']) > $max_combined_size*1024) { $error.="<b>FAILED:</b> All Files <b>REASON:</b> Combined file size is to large.<br />"; // Loop though, verify and upload files. } Else { // Loop through all the files. For($i=0; $i <= $file_uploads-1; $i++) { // If a file actually exists in this key If($_FILES['file']['name'][$i]) { //Get the file extension $file_ext[$i]=get_ext($_FILES['file']['name'][$i]); // Randomize file names If($random_name){ $file_name[$i]=time()+rand(0,100000); } Else { $file_name[$i]=cln_file_name($_FILES['file']['name'][$i]); } // Check for blank file name If(str_replace(" ", "", $file_name[$i])=="") { $error.= "<b>FAILED:</b> ".$_FILES['file']['name'][$i]." <b>REASON:</b> Blank file name detected.<br />"; //Check if the file type uploaded is a valid file type. } ElseIf(!in_array($file_ext[$i], $allow_types)) { $error.= "<b>FAILED:</b> ".$_FILES['file']['name'][$i]." <b>REASON:</b> Invalide file type.<br />"; //Check the size of each file } Elseif($_FILES['file']['size'][$i] > ($max_file_size*1024)) { $error.= "<b>FAILED:</b> ".$_FILES['file']['name'][$i]." <b>REASON:</b> File to large.<br />"; // Check if the file already exists on the server.. } Elseif(file_exists($folder.$file_name[$i].".".$file_ext[$i])) { $error.= "<b>FAILED:</b> ".$_FILES['file']['name'][$i]." <b>REASON:</b> File already exists.<br />"; } Else { If(move_uploaded_file($_FILES['file']['tmp_name'][$i],$folder.$file_name[$i].".".$file_ext[$i])) { $success.="<b>SUCCESS:</b> ".$_FILES['file']['name'][$i]."<br />"; $success.="<b>URL:</b> <a href=\"".$full_url.$file_name[$i].".".$file_ext[$i]."\" target=\"_blank\">".$full_url.$file_name[$i].".".$file_ext[$i]."</a><br /><br />"; } Else { $error.="<b>FAILED:</b> ".$_FILES['file']['name'][$i]." <b>REASON:</b> General upload failure.<br />"; } } } // If Files } // For } // Else Total Size If(($error=="") AND ($success=="")) { $error.="<b>FAILED:</b> No files selected<br />"; } $display_message=$success.$error; } // $_POST AND !$password_form /* //================================================================================ * Start the form layout //================================================================================ :- Please know what your doing before editing below. Sorry for the stop and start php.. people requested that I use only html for the form.. */ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Language" content="en-us" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title><?php echo $websitename; ?> - Powered By phUploader</title> <style type="text/css"> body{ background-color:#FFFFFF; font-family: Verdana, Arial, sans-serif; font-size: 12pt; color: #000000; } .message { font-family: Verdana, Arial, sans-serif; font-size: 11pt; color: #000000; background-color:#EBEBEB; } a:link, a:visited { text-decoration:none; color: #000000; } a:hover { text-decoration:none; color: #000000; } .table { border-collapse:collapse; border:1px solid #000000; width:450px; } .table_header { border:1px solid #000000; background-color:#C03738; font-family: Verdana, Arial, sans-serif; font-size: 11pt; font-weight:bold; color: #FFFFFF; text-align:center; padding:2px; } .upload_info { border:1px solid #000000; background-color:#EBEBEB; font-family: Verdana, Arial, sans-serif; font-size: 8pt; color: #000000; padding:4px; } .table_body { border:1px solid #000000; background-color:#EBEBEB; font-family: Verdana, Arial, sans-serif; font-size: 10pt; color: #000000; padding:2px; } .table_footer { border:1px solid #000000; background-color:#C03738; text-align:center; padding:2px; } input,select,textarea { font-family: Verdana, Arial, sans-serif; font-size: 10pt; color: #000000; background-color:#AFAEAE; border:1px solid #000000; } .copyright { border:0px; font-family: Verdana, Arial, sans-serif; font-size: 9pt; color: #000000; text-align:right; } form { padding:0px; margin:0px; } </style> <? If($password_form) { Echo $password_form; } Else { ?> <form action="<?=$_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data" name="phuploader"> <table align="center" class="table"> <tr> <td class="table_header" colspan="2"><b><?=$websitename;?></b> </td> </tr> <?If($display_message){?> <tr> <td colspan="2" class="message"> <br /> <?=$display_message;?> <br /> </td> </tr> <?}?> <tr> <td colspan="2" class="upload_info"> <b>Allowed Types:</b> <?=implode($allow_types, ", ");?><br /> <b>Max size per file:</b> <?=$max_file_size?>kb.<br /> <b>Max size for all files combined:</b> <?=$max_combined_size?>kb.<br /> </td> </tr> <?For($i=0;$i <= $file_uploads-1;$i++) {?> <tr> <td class="table_body" width="20%"><b>Select File:</b> </td> <td class="table_body" width="80%"><input type="file" name="file[]" size="30" /></td> </tr> <?}?> <tr> <td colspan="2" align="center" class="table_footer"> <input type="hidden" name="submit" value="true" /> <input type="submit" value=" Upload File(s) " /> &nbsp; <input type="reset" name="reset" value=" Reset Form " onclick="window.location.reload(true);" /> </td> </tr> </table> </form> <?}//Please leave this here.. it really dosen't make people hate you or make your site look bad.. ?> <table class="table" style="border:0px;" align="center"> <tr> <td><div class="copyright">&copy;<a href="http://www.phphq.net/?script=phUploader" target="_blank" title="Uploader Powered By phUploader &lt;www.phphq.net&gt;">phUploader</a></div></td> </tr> </table> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 72
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 48
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 48
Branch analysis from position: 31
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 48
2 jumps found. (Code = 43) Position 1 = 52, Position 2 = 72
Branch analysis from position: 52
2 jumps found. (Code = 46) Position 1 = 76, Position 2 = 78
Branch analysis from position: 76
2 jumps found. (Code = 43) Position 1 = 79, Position 2 = 245
Branch analysis from position: 79
2 jumps found. (Code = 43) Position 1 = 88, Position 2 = 90
Branch analysis from position: 88
1 jumps found. (Code = 42) Position 1 = 237
Branch analysis from position: 237
2 jumps found. (Code = 46) Position 1 = 239, Position 2 = 241
Branch analysis from position: 239
2 jumps found. (Code = 43) Position 1 = 242, Position 2 = 243
Branch analysis from position: 242
2 jumps found. (Code = 43) Position 1 = 249, Position 2 = 251
Branch analysis from position: 249
1 jumps found. (Code = 42) Position 1 = 281
Branch analysis from position: 281
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 251
2 jumps found. (Code = 43) Position 1 = 259, Position 2 = 262
Branch analysis from position: 259
1 jumps found. (Code = 42) Position 1 = 277
Branch analysis from position: 277
2 jumps found. (Code = 44) Position 1 = 280, Position 2 = 275
Branch analysis from position: 280
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 275
2 jumps found. (Code = 44) Position 1 = 280, Position 2 = 275
Branch analysis from position: 280
Branch analysis from position: 275
Branch analysis from position: 262
Branch analysis from position: 243
Branch analysis from position: 241
Branch analysis from position: 90
1 jumps found. (Code = 42) Position 1 = 234
Branch analysis from position: 234
2 jumps found. (Code = 44) Position 1 = 237, Position 2 = 92
Branch analysis from position: 237
Branch analysis from position: 92
2 jumps found. (Code = 43) Position 1 = 97, Position 2 = 233
Branch analysis from position: 97
2 jumps found. (Code = 43) Position 1 = 107, Position 2 = 117
Branch analysis from position: 107
1 jumps found. (Code = 42) Position 1 = 126
Branch analysis from position: 126
2 jumps found. (Code = 43) Position 1 = 134, Position 2 = 142
Branch analysis from position: 134
1 jumps found. (Code = 42) Position 1 = 233
Branch analysis from position: 233
2 jumps found. (Code = 44) Position 1 = 237, Position 2 = 92
Branch analysis from position: 237
Branch analysis from position: 92
Branch analysis from position: 142
2 jumps found. (Code = 43) Position 1 = 149, Position 2 = 157
Branch analysis from position: 149
1 jumps found. (Code = 42) Position 1 = 233
Branch analysis from position: 233
Branch analysis from position: 157
2 jumps found. (Code = 43) Position 1 = 164, Position 2 = 172
Branch analysis from position: 164
1 jumps found. (Code = 42) Position 1 = 233
Branch analysis from position: 233
Branch analysis from position: 172
2 jumps found. (Code = 43) Position 1 = 181, Position 2 = 189
Branch analysis from position: 181
1 jumps found. (Code = 42) Position 1 = 233
Branch analysis from position: 233
Branch analysis from position: 189
2 jumps found. (Code = 43) Position 1 = 203, Position 2 = 226
Branch analysis from position: 203
1 jumps found. (Code = 42) Position 1 = 233
Branch analysis from position: 233
Branch analysis from position: 226
2 jumps found. (Code = 44) Position 1 = 237, Position 2 = 92
Branch analysis from position: 237
Branch analysis from position: 92
Branch analysis from position: 117
2 jumps found. (Code = 43) Position 1 = 134, Position 2 = 142
Branch analysis from position: 134
Branch analysis from position: 142
Branch analysis from position: 233
Branch analysis from position: 245
Branch analysis from position: 78
Branch analysis from position: 72
Branch analysis from position: 48
Branch analysis from position: 72
filename:       /in/070d5
function name:  (null)
number of ops:  283
compiled vars:  !0 = $max_file_size, !1 = $max_combined_size, !2 = $file_uploads, !3 = $websitename, !4 = $full_url, !5 = $folder, !6 = $random_name, !7 = $allow_types, !8 = $fullpath, !9 = $password, !10 = $password_hash, !11 = $error, !12 = $success, !13 = $display_message, !14 = $file_ext, !15 = $password_form, !16 = $i, !17 = $file_name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  102     0  E >   ASSIGN                                                   !0, '512'
  105     1        ASSIGN                                                   !1, '2048'
  108     2        ASSIGN                                                   !2, '4'
  111     3        ASSIGN                                                   !3, 'Your+site+name'
  114     4        ASSIGN                                                   !4, 'http%3A%2F%2FYOUR_SITE%2Fuploads%2F'
  117     5        ASSIGN                                                   !5, '.%2Fuploads%2F'
  121     6        ASSIGN                                                   !6, <true>
  124     7        ASSIGN                                                   !7, <array>
  127     8        ASSIGN                                                   !8, ''
  130     9        ASSIGN                                                   !9, ''
  140    10        INIT_FCALL                                               'md5'
         11        SEND_VAR                                                 !9
         12        DO_ICALL                                         $28     
         13        ASSIGN                                                   !10, $28
  141    14        ASSIGN                                                   !11, ''
  142    15        ASSIGN                                                   !12, ''
  143    16        ASSIGN                                                   !13, ''
  144    17        ASSIGN                                                   !14, <array>
  145    18        ASSIGN                                                   !15, ''
  163    19      > JMPZ                                                     !9, ->72
  166    20    >   FETCH_R                      global              ~35     '_POST'
         21        FETCH_DIM_R                                      ~36     ~35, 'verify_password'
         22        BOOL                                             ~37     ~36
         23      > JMPZ                                                     ~37, ->48
  167    24    >   INIT_FCALL                                               'md5'
         25        FETCH_R                      global              ~38     '_POST'
         26        FETCH_DIM_R                                      ~39     ~38, 'check_password'
         27        SEND_VAL                                                 ~39
         28        DO_ICALL                                         $40     
         29        IS_EQUAL                                                 !10, $40
         30      > JMPZ                                                     ~41, ->48
  168    31    >   INIT_FCALL                                               'setcookie'
         32        SEND_VAL                                                 'phUploader'
         33        SEND_VAR                                                 !10
         34        DO_ICALL                                                 
  169    35        INIT_FCALL                                               'sleep'
         36        SEND_VAL                                                 1
         37        DO_ICALL                                                 
  170    38        INIT_FCALL                                               'header'
         39        FETCH_R                      global              ~44     '_SERVER'
         40        FETCH_DIM_R                                      ~45     ~44, 'HTTP_HOST'
         41        CONCAT                                           ~46     'Location%3A+http%3A%2F%2F', ~45
         42        FETCH_R                      global              ~47     '_SERVER'
         43        FETCH_DIM_R                                      ~48     ~47, 'PHP_SELF'
         44        CONCAT                                           ~49     ~46, ~48
         45        SEND_VAL                                                 ~49
         46        DO_ICALL                                                 
  171    47      > EXIT                                                     
  176    48    >   FETCH_R                      global              ~51     '_COOKIE'
         49        FETCH_DIM_R                                      ~52     ~51, 'phUploader'
         50        IS_NOT_EQUAL                                             !10, ~52
         51      > JMPZ                                                     ~53, ->72
  177    52    >   FETCH_R                      global              ~54     '_SERVER'
         53        FETCH_DIM_R                                      ~55     ~54, 'PHP_SELF'
         54        CONCAT                                           ~56     '%3Cform+method%3D%22POST%22+action%3D%22', ~55
         55        CONCAT                                           ~57     ~56, '%22%3E%0A'
         56        ASSIGN                                                   !15, ~57
  178    57        ASSIGN_OP                                     8          !15, '%3Ctable+align%3D%22center%22+class%3D%22table%22%3E%0A'
  179    58        ASSIGN_OP                                     8          !15, '%3Ctr%3E%0A'
  180    59        ASSIGN_OP                                     8          !15, '%3Ctd+width%3D%22100%25%22+class%3D%22table_header%22+colspan%3D%222%22%3EPassword+Required%3C%2Ftd%3E%0A'
  181    60        ASSIGN_OP                                     8          !15, '%3C%2Ftr%3E%0A'
  182    61        ASSIGN_OP                                     8          !15, '%3Ctr%3E%0A'
  183    62        ASSIGN_OP                                     8          !15, '%3Ctd+width%3D%2235%25%22+class%3D%22table_body%22%3EEnter+Password%3A%3C%2Ftd%3E%0A'
  184    63        ASSIGN_OP                                     8          !15, '%3Ctd+width%3D%2265%25%22+class%3D%22table_body%22%3E%3Cinput+type%3D%22password%22+name%3D%22check_password%22+%2F%3E%3C%2Ftd%3E%0A'
  185    64        ASSIGN_OP                                     8          !15, '%3C%2Ftr%3E%0A'
  186    65        ASSIGN_OP                                     8          !15, '%3Ctd+colspan%3D%222%22+align%3D%22center%22+class%3D%22table_body%22%3E%0A'
  187    66        ASSIGN_OP                                     8          !15, '%3Cinput+type%3D%22hidden%22+name%3D%22verify_password%22+value%3D%22true%22%3E%0A'
  188    67        ASSIGN_OP                                     8          !15, '%3Cinput+type%3D%22submit%22+value%3D%22+Verify+Password+%22+%2F%3E%0A'
  189    68        ASSIGN_OP                                     8          !15, '%3C%2Ftd%3E%0A'
  190    69        ASSIGN_OP                                     8          !15, '%3C%2Ftr%3E%0A'
  191    70        ASSIGN_OP                                     8          !15, '%3C%2Ftable%3E%0A'
  192    71        ASSIGN_OP                                     8          !15, '%3C%2Fform%3E%0A'
  198    72    >   FETCH_R                      global              ~74     '_POST'
         73        FETCH_DIM_R                                      ~75     ~74, 'submit'
         74        BOOL                                             ~76     ~75
         75      > JMPZ_EX                                          ~76     ~76, ->78
         76    >   IS_EQUAL                                         ~77     !15, ''
         77        BOOL                                             ~76     ~77
         78    > > JMPZ                                                     ~76, ->245
  201    79    >   INIT_FCALL                                               'array_sum'
         80        FETCH_R                      global              ~78     '_FILES'
         81        FETCH_DIM_R                                      ~79     ~78, 'file'
         82        FETCH_DIM_R                                      ~80     ~79, 'size'
         83        SEND_VAL                                                 ~80
         84        DO_ICALL                                         $81     
         85        MUL                                              ~82     !1, 1024
         86        IS_SMALLER                                               ~82, $81
         87      > JMPZ                                                     ~83, ->90
  203    88    >   ASSIGN_OP                                     8          !11, '%3Cb%3EFAILED%3A%3C%2Fb%3E+All+Files+%3Cb%3EREASON%3A%3C%2Fb%3E+Combined+file+size+is+to+large.%3Cbr+%2F%3E'
         89      > JMP                                                      ->237
  209    90    >   ASSIGN                                                   !16, 0
         91      > JMP                                                      ->234
  212    92    >   FETCH_R                      global              ~86     '_FILES'
         93        FETCH_DIM_R                                      ~87     ~86, 'file'
         94        FETCH_DIM_R                                      ~88     ~87, 'name'
         95        FETCH_DIM_R                                      ~89     ~88, !16
         96      > JMPZ                                                     ~89, ->233
  215    97    >   INIT_FCALL                                               'get_ext'
         98        FETCH_R                      global              ~91     '_FILES'
         99        FETCH_DIM_R                                      ~92     ~91, 'file'
        100        FETCH_DIM_R                                      ~93     ~92, 'name'
        101        FETCH_DIM_R                                      ~94     ~93, !16
        102        SEND_VAL                                                 ~94
        103        DO_FCALL                                      0  $95     
        104        ASSIGN_DIM                                               !14, !16
        105        OP_DATA                                                  $95
  218   106      > JMPZ                                                     !6, ->117
  219   107    >   INIT_FCALL                                               'time'
        108        DO_ICALL                                         $97     
        109        INIT_FCALL                                               'rand'
        110        SEND_VAL                                                 0
        111        SEND_VAL                                                 100000
        112        DO_ICALL                                         $98     
        113        ADD                                              ~99     $97, $98
        114        ASSIGN_DIM                                               !17, !16
        115        OP_DATA                                                  ~99
        116      > JMP                                                      ->126
  221   117    >   INIT_FCALL                                               'cln_file_name'
        118        FETCH_R                      global              ~101    '_FILES'
        119        FETCH_DIM_R                                      ~102    ~101, 'file'
        120        FETCH_DIM_R                                      ~103    ~102, 'name'
        121        FETCH_DIM_R                                      ~104    ~103, !16
        122        SEND_VAL                                                 ~104
        123        DO_FCALL                                      0  $105    
        124        ASSIGN_DIM                                               !17, !16
        125        OP_DATA                                                  $105
  225   126    >   INIT_FCALL                                               'str_replace'
        127        SEND_VAL                                                 '+'
        128        SEND_VAL                                                 ''
        129        FETCH_DIM_R                                      ~106    !17, !16
        130        SEND_VAL                                                 ~106
        131        DO_ICALL                                         $107    
        132        IS_EQUAL                                                 $107, ''
        133      > JMPZ                                                     ~108, ->142
  227   134    >   FETCH_R                      global              ~109    '_FILES'
        135        FETCH_DIM_R                                      ~110    ~109, 'file'
        136        FETCH_DIM_R                                      ~111    ~110, 'name'
        137        FETCH_DIM_R                                      ~112    ~111, !16
        138        CONCAT                                           ~113    '%3Cb%3EFAILED%3A%3C%2Fb%3E+', ~112
        139        CONCAT                                           ~114    ~113, '+%3Cb%3EREASON%3A%3C%2Fb%3E+Blank+file+name+detected.%3Cbr+%2F%3E'
        140        ASSIGN_OP                                     8          !11, ~114
        141      > JMP                                                      ->233
  230   142    >   INIT_FCALL                                               'in_array'
        143        FETCH_DIM_R                                      ~116    !14, !16
        144        SEND_VAL                                                 ~116
        145        SEND_VAR                                                 !7
        146        DO_ICALL                                         $117    
        147        BOOL_NOT                                         ~118    $117
        148      > JMPZ                                                     ~118, ->157
  232   149    >   FETCH_R                      global              ~119    '_FILES'
        150        FETCH_DIM_R                                      ~120    ~119, 'file'
        151        FETCH_DIM_R                                      ~121    ~120, 'name'
        152        FETCH_DIM_R                                      ~122    ~121, !16
        153        CONCAT                                           ~123    '%3Cb%3EFAILED%3A%3C%2Fb%3E+', ~122
        154        CONCAT                                           ~124    ~123, '+%3Cb%3EREASON%3A%3C%2Fb%3E+Invalide+file+type.%3Cbr+%2F%3E'
        155        ASSIGN_OP                                     8          !11, ~124
        156      > JMP                                                      ->233
  235   157    >   FETCH_R                      global              ~126    '_FILES'
        158        FETCH_DIM_R                                      ~127    ~126, 'file'
        159        FETCH_DIM_R                                      ~128    ~127, 'size'
        160        FETCH_DIM_R                                      ~129    ~128, !16
        161        MUL                                              ~130    !0, 1024
        162        IS_SMALLER                                               ~130, ~129
        163      > JMPZ                                                     ~131, ->172
  237   164    >   FETCH_R                      global              ~132    '_FILES'
        165        FETCH_DIM_R                                      ~133    ~132, 'file'
        166        FETCH_DIM_R                                      ~134    ~133, 'name'
        167        FETCH_DIM_R                                      ~135    ~134, !16
        168        CONCAT                                           ~136    '%3Cb%3EFAILED%3A%3C%2Fb%3E+', ~135
        169        CONCAT                                           ~137    ~136, '+%3Cb%3EREASON%3A%3C%2Fb%3E+File+to+large.%3Cbr+%2F%3E'
        170        ASSIGN_OP                                     8          !11, ~137
        171      > JMP                                                      ->233
  240   172    >   INIT_FCALL                                               'file_exists'
        173        FETCH_DIM_R                                      ~139    !17, !16
        174        CONCAT                                           ~140    !5, ~139
        175        CONCAT                                           ~141    ~140, '.'
        176        FETCH_DIM_R                                      ~142    !14, !16
        177        CONCAT                                           ~143    ~141, ~142
        178        SEND_VAL                                                 ~143
        179        DO_ICALL                                         $144    
        180      > JMPZ                                                     $144, ->189
  242   181    >   FETCH_R                      global              ~145    '_FILES'
        182        FETCH_DIM_R                                      ~146    ~145, 'file'
        183        FETCH_DIM_R                                      ~147    ~146, 'name'
        184        FETCH_DIM_R                                      ~148    ~147, !16
        185        CONCAT                                           ~149    '%3Cb%3EFAILED%3A%3C%2Fb%3E+', ~148
        186        CONCAT                                           ~150    ~149, '+%3Cb%3EREASON%3A%3C%2Fb%3E+File+already+exists.%3Cbr+%2F%3E'
        187        ASSIGN_OP                                     8          !11, ~150
        188      > JMP                                                      ->233
  246   189    >   INIT_FCALL                                               'move_uploaded_file'
        190        FETCH_R                      global              ~152    '_FILES'
        191        FETCH_DIM_R                                      ~153    ~152, 'file'
        192        FETCH_DIM_R                                      ~154    ~153, 'tmp_name'
        193        FETCH_DIM_R                                      ~155    ~154, !16
        194        SEND_VAL                                                 ~155
        195        FETCH_DIM_R                                      ~156    !17, !16
        196        CONCAT                                           ~157    !5, ~156
        197        CONCAT                                           ~158    ~157, '.'
        198        FETCH_DIM_R                                      ~159    !14, !16
        199        CONCAT                                           ~160    ~158, ~159
        200        SEND_VAL                                                 ~160
        201        DO_ICALL                                         $161    
        202      > JMPZ                                                     $161, ->226
  248   203    >   FETCH_R                      global              ~162    '_FILES'
        204        FETCH_DIM_R                                      ~163    ~162, 'file'
        205        FETCH_DIM_R                                      ~164    ~163, 'name'
        206        FETCH_DIM_R                                      ~165    ~164, !16
        207        CONCAT                                           ~166    '%3Cb%3ESUCCESS%3A%3C%2Fb%3E+', ~165
        208        CONCAT                                           ~167    ~166, '%3Cbr+%2F%3E'
        209        ASSIGN_OP                                     8          !12, ~167
  249   210        CONCAT                                           ~169    '%3Cb%3EURL%3A%3C%2Fb%3E+%3Ca+href%3D%22', !4
        211        FETCH_DIM_R                                      ~170    !17, !16
        212        CONCAT                                           ~171    ~169, ~170
        213        CONCAT                                           ~172    ~171, '.'
        214        FETCH_DIM_R                                      ~173    !14, !16
        215        CONCAT                                           ~174    ~172, ~173
        216        CONCAT                                           ~175    ~174, '%22+target%3D%22_blank%22%3E'
        217        CONCAT                                           ~176    ~175, !4
        218        FETCH_DIM_R                                      ~177    !17, !16
        219        CONCAT                                           ~178    ~176, ~177
        220        CONCAT                                           ~179    ~178, '.'
        221        FETCH_DIM_R                                      ~180    !14, !16
        222        CONCAT                                           ~181    ~179, ~180
        223        CONCAT                                           ~182    ~181, '%3C%2Fa%3E%3Cbr+%2F%3E%3Cbr+%2F%3E'
        224        ASSIGN_OP                                     8          !12, ~182
        225      > JMP                                                      ->233
  252   226    >   FETCH_R                      global              ~184    '_FILES'
        227        FETCH_DIM_R                                      ~185    ~184, 'file'
        228        FETCH_DIM_R                                      ~186    ~185, 'name'
        229        FETCH_DIM_R                                      ~187    ~186, !16
        230        CONCAT                                           ~188    '%3Cb%3EFAILED%3A%3C%2Fb%3E+', ~187
        231        CONCAT                                           ~189    ~188, '+%3Cb%3EREASON%3A%3C%2Fb%3E+General+upload+failure.%3Cbr+%2F%3E'
        232        ASSIGN_OP                                     8          !11, ~189
  209   233    >   PRE_INC                                                  !16
        234    >   SUB                                              ~192    !2, 1
        235        IS_SMALLER_OR_EQUAL                                      !16, ~192
        236      > JMPNZ                                                    ~193, ->92
  263   237    >   IS_EQUAL                                         ~194    !11, ''
        238      > JMPZ_EX                                          ~194    ~194, ->241
        239    >   IS_EQUAL                                         ~195    !12, ''
        240        BOOL                                             ~194    ~195
        241    > > JMPZ                                                     ~194, ->243
  264   242    >   ASSIGN_OP                                     8          !11, '%3Cb%3EFAILED%3A%3C%2Fb%3E+No+files+selected%3Cbr+%2F%3E'
  267   243    >   CONCAT                                           ~197    !12, !11
        244        ASSIGN                                                   !13, ~197
  278   245    >   ECHO                                                     '%3C%21DOCTYPE+html+PUBLIC+%22-%2F%2FW3C%2F%2FDTD+XHTML+1.0+Transitional%2F%2FEN%22+%22http%3A%2F%2Fwww.w3.org%2FTR%2Fxhtml1%2FDTD%2Fxhtml1-transitional.dtd%22%3E%0A%3Chtml+xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22+xml%3Alang%3D%22en%22+lang%3D%22en%22%3E%0A%3Chead%3E%0A%3Cmeta+http-equiv%3D%22Content-Language%22+content%3D%22en-us%22+%2F%3E%0A%3Cmeta+http-equiv%3D%22Content-Type%22+content%3D%22text%2Fhtml%3B+charset%3Diso-8859-1%22+%2F%3E%0A%3Ctitle%3E'
  283   246        ECHO                                                     !3
        247        ECHO                                                     '+-+Powered+By+phUploader%3C%2Ftitle%3E%0A%0A%3Cstyle+type%3D%22text%2Fcss%22%3E%0A%09body%7B%0A%09%09background-color%3A%23FFFFFF%3B%0A%09%09font-family%3A+Verdana%2C+Arial%2C+sans-serif%3B%0A%09%09font-size%3A+12pt%3B%0A%09%09color%3A+%23000000%3B%0A%09%7D%0A%09%0A%09.message+%7B%0A%09%09font-family%3A+Verdana%2C+Arial%2C+sans-serif%3B%0A%09%09font-size%3A+11pt%3B%0A%09%09color%3A+%23000000%3B%0A%09%09background-color%3A%23EBEBEB%3B%0A%09%7D%0A%0A%09a%3Alink%2C+a%3Avisited+%7B%0A%09%09text-decoration%3Anone%3B%0A%09%09color%3A+%23000000%3B%0A%09%7D%0A%09%0A%09a%3Ahover+%7B%0A%09%09text-decoration%3Anone%3B%0A%09%09color%3A+%23000000%3B%0A%09%7D%0A%0A%09.table+%7B%0A%09%09border-collapse%3Acollapse%3B%0A%09%09border%3A1px+solid+%23000000%3B%0A%09%09width%3A450px%3B%0A%09%7D%0A%09%0A%09.table_header+%7B%0A%09%09border%3A1px+solid+%23000000%3B%0A%09%09background-color%3A%23C03738%3B%0A%09%09font-family%3A+Verdana%2C+Arial%2C+sans-serif%3B%0A%09%09font-size%3A+11pt%3B%0A%09%09font-weight%3Abold%3B%0A%09%09color%3A+%23FFFFFF%3B%0A%09%09text-align%3Acenter%3B%0A%09%09padding%3A2px%3B%0A%09%7D%0A%09%0A%09.upload_info+%7B%0A%09%09border%3A1px+solid+%23000000%3B%0A%09%09background-color%3A%23EBEBEB%3B%0A%09%09font-family%3A+Verdana%2C+Arial%2C+sans-serif%3B%0A%09%09font-size%3A+8pt%3B%0A%09%09color%3A+%23000000%3B%0A%09%09padding%3A4px%3B%0A%09%7D%0A%0A%09.table_body+%7B%0A%09%09border%3A1px+solid+%23000000%3B%0A%09%09background-color%3A%23EBEBEB%3B%0A%09%09font-family%3A+Verdana%2C+Arial%2C+sans-serif%3B%0A%09%09font-size%3A+10pt%3B%0A%09%09color%3A+%23000000%3B%0A%09%09padding%3A2px%3B%0A%09%7D%0A%0A%09.table_footer+%7B%0A%09%09border%3A1px+solid+%23000000%3B%0A%09%09background-color%3A%23C03738%3B%0A%09%09text-align%3Acenter%3B%0A%09%09padding%3A2px%3B%0A%09%7D%0A%0A%09input%2Cselect%2Ctextarea+%7B%0A%09%09font-family%3A+Verdana%2C+Arial%2C+sans-serif%3B%0A%09%09font-size%3A+10pt%3B%0A%09%09color%3A+%23000000%3B%0A%09%09background-color%3A%23AFAEAE%3B%0A%09%09border%3A1px+solid+%23000000%3B%0A%09%7D%0A%09%0A%09.copyright+%7B%0A%09%09border%3A0px%3B%0A%09%09font-family%3A+Verdana%2C+Arial%2C+sans-serif%3B%0A%09%09font-size%3A+9pt%3B%0A%09%09color%3A+%23000000%3B%0A%09%09text-align%3Aright%3B%0A%09%7D%0A%09%0A%09form+%7B%0A%09%09padding%3A0px%3B%0A%09%09margin%3A0px%3B%0A%09%7D%0A%3C%2Fstyle%3E%0A%0A'
  375   248      > JMPZ                                                     !15, ->251
  377   249    >   ECHO                                                     !15
        250      > JMP                                                      ->281
  381   251    >   ECHO                                                     '%0A%3Cform+action%3D%22'
  382   252        FETCH_R                      global              ~199    '_SERVER'
        253        FETCH_DIM_R                                      ~200    ~199, 'PHP_SELF'
        254        ECHO                                                     ~200
        255        ECHO                                                     '%22+method%3D%22post%22+enctype%3D%22multipart%2Fform-data%22+name%3D%22phuploader%22%3E%0A%3Ctable+align%3D%22center%22+class%3D%22table%22%3E%0A%09%3Ctr%3E%0A%09%09%3Ctd+class%3D%22table_header%22+colspan%3D%222%22%3E%3Cb%3E'
  385   256        ECHO                                                     !3
        257        ECHO                                                     '%3C%2Fb%3E+%3C%2Ftd%3E%0A%09%3C%2Ftr%3E%0A%0A%09'
  388   258      > JMPZ                                                     !13, ->262
  389   259    >   ECHO                                                     '%09%3Ctr%3E%0A%09%09%3Ctd+colspan%3D%222%22+class%3D%22message%22%3E%0A%09%09%3Cbr+%2F%3E%0A%09%09%09'
  392   260        ECHO                                                     !13
  393   261        ECHO                                                     '%09%09%3Cbr+%2F%3E%0A%09%09%3C%2Ftd%3E%0A%09%3C%2Ftr%3E%0A%09'
  397   262    >   ECHO                                                     '%09%0A%09%3Ctr%3E%0A%09%09%3Ctd+colspan%3D%222%22+class%3D%22upload_info%22%3E%0A%09%09%09%3Cb%3EAllowed+Types%3A%3C%2Fb%3E+'
  400   263        INIT_FCALL                                               'implode'
        264        SEND_VAR                                                 !7
        265        SEND_VAL                                                 '%2C+'
        266        DO_ICALL                                         $201    
        267        ECHO                                                     $201
        268        ECHO                                                     '%3Cbr+%2F%3E%0A%09%09%09%3Cb%3EMax+size+per+file%3A%3C%2Fb%3E+'
  401   269        ECHO                                                     !0
        270        ECHO                                                     'kb.%3Cbr+%2F%3E%0A%09%09%09%3Cb%3EMax+size+for+all+files+combined%3A%3C%2Fb%3E+'
  402   271        ECHO                                                     !1
 

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.49 ms | 1430 KiB | 39 Q