One Hat Cyber Team
Your IP :
172.69.130.198
Server IP :
188.114.96.4
Server :
Linux thuru 6.5.11-4-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-4 (2023-11-20T10:19Z) x86_64
Server Software :
Apache/2.4.51 (Unix) OpenSSL/1.0.2k-fips
PHP Version :
7.3.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
thuruk
/
vanithabhimana.lk
/
version2023
/
Edit File:
index.php_old
<?php require 'Mailer/class.phpmailer.php'; $targetfolder = "PDF/"; //$targetfolder = $targetfolder . basename( $_FILES['file']['name']) ; if(isset($_FILES["file"]["name"])){ $filename=$_FILES["file"]["name"]; $tmpname=$_FILES["file"]["tmp_name"]; $filetype=$_FILES["file"]["type"]; $errors=[]; $fileextensions=["pdf"]; $arr=explode(".",$filename); $ext=strtolower(end($arr)); $uploadpath=$targetfolder.basename($filename); if(! in_array($ext,$fileextensions)) { $errors[]="Invalid filename"; } if(empty($errors)) { if(move_uploaded_file($tmpname,$uploadpath)) { echo "file uploaded successfully"; $mail = new PHPMailer(true); //defaults to using php "mail()"; the true param means it will throw exceptions on errors, which we need to catch try { $mail->AddReplyTo('info@vanithabhimana.lk', 'Vanithabhimana'); $mail->AddAddress('info@vanithabhimana.lk', 'Vanithabhimana'); $mail->SetFrom('info@vanithabhimana.lk', 'Vanithabhimana'); $mail->AddReplyTo('info@vanithabhimana.lk', 'Vanithabhimana'); $mail->Subject = 'New Application'; $mail->AltBody = ''; // optional - MsgHTML will create an alternate automaticall $mail->AddAttachment($uploadpath); // attachment $mail->Body = "New Application"; $mail->Send(); } catch (phpmailerException $e) { echo $e->errorMessage(); //Pretty error messages from PHPMailer } catch (Exception $e) { echo $e->getMessage(); //Boring error messages from anything else! } } else { echo "not successfull"; } } else { echo "not successfull"; } } // if(move_uploaded_file($_FILES['file']['tmp_name'], $targetfolder)) // { // echo "The file ". basename( $_FILES['file']['name']). " is successfully uploaded"; // $mail = new PHPMailer(true); //defaults to using php "mail()"; the true param means it will throw exceptions on errors, which we need to catch // try { // $mail->AddReplyTo('info@vanithabhimana.lk', 'Vanithabhimana'); // $mail->AddAddress('info@vanithabhimana.lk', 'Vanithabhimana'); // $mail->SetFrom('info@vanithabhimana.lk', 'Vanithabhimana'); // $mail->AddReplyTo('info@vanithabhimana.lk', 'Vanithabhimana'); // $mail->Subject = 'New Application'; // $mail->AltBody = ''; // optional - MsgHTML will create an alternate automatically // // $mail->MsgHTML(file_get_contents('contents.html')); // // $mail->AddAttachment('images/phpmailer.gif'); // attachment // $mail->AddAttachment($targetfolder); // attachment // $mail->Body = "New Application"; // $mail->Send(); // } catch (phpmailerException $e) { // echo $e->errorMessage(); //Pretty error messages from PHPMailer // } catch (Exception $e) { // echo $e->getMessage(); //Boring error messages from anything else! // } // } // else { // // echo "Problem uploading file"; // } ?> <!-- Global site tag (gtag.js) - Google Analytics <script async src="https://www.googletagmanager.com/gtag/js?id=G-JP7QTTR2H3"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-JP7QTTR2H3'); </script> --> <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="./resources/css/style.css"> <link rel="stylesheet" href="./resources/css/bootstrap.min.css"> <link rel="shortcut icon" href="./resources/vanithabhimana-Logo.png"> <title>Vanithabhimana 2022</title> <meta charset="utf-8"> </head> <body> <main> <img id="logo" src="./resources/vanithabhimana-Logo.png"> <p class="tagline">- Coporate Competition -</p> <div class="container button-area"> <div class="row"> <h3 class="down-topic">Download Application</h3> <div class="col-md-4"> <a class="down-btn" target="_blank" href="Vanithabimana Cooparate Application 2022.pdf">සිංහල</a> </div> <div class="col-md-4"> <a class="down-btn" target="_blank" href="Vanithabimana Cooparate English Application 2022.pdf">English</a> </div> <div class="col-md-4"> <a class="down-btn" target="_blank" href="Vanithabimana Cooparate Application 2022.pdf">தமிழ்</a> </div> </div> <div class="row"> <div class="google-form"> <h3>Fill Application Here</h3> <div class="form-area"> <a class="down-btn" href="https://forms.gle/AQUw3FKdcE8EgMEM9">Google Form</a> </div> </div> </div> <div class="row"> <h3 class="down-topic">Submit Your Application</h3> <form class="upload-form" method="post" enctype="multipart/form-data"> <label for="myfile">Select a file:</label> <input type="file" id="myfile" name="file" required> <input type="submit"> </form> </div> </div> <div class="bottom-space"></div> </main> </body> <script src="./resources/js/jquery.min.js"></script> <script src="./resources/js/bootstrap.min.js"></script> </html>
Simpan