403Webshell
Server IP : 68.183.124.220  /  Your IP : 216.73.216.255
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : gavin ( 1000)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/worksheets/class/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/worksheets/class/Customer.php
<?php
class Customer
{
  private function getUserIP()
  {
    if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
              $_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
              $_SERVER['HTTP_CLIENT_IP'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
    }
    $client  = @$_SERVER['HTTP_CLIENT_IP'];
    $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
    $remote  = $_SERVER['REMOTE_ADDR'];

    if(filter_var($client, FILTER_VALIDATE_IP))
    {
        $ip = $client;
    }
    elseif(filter_var($forward, FILTER_VALIDATE_IP))
    {
        $ip = $forward;
    }
    else
    {
        $ip = $remote;
    }

    return $ip;
  }

  public function saveToFile()
  {
    $user_ip = $this->getUserIP();
    $date = date('h:i:s a', time());   
    
    $property_name = $_POST["propertyname"];
    $first_name = $_POST["firstname"];
    $last_name  = $_POST["lastname"];
    $full_name =  str_replace(' ', '_', $property_name . '_' .$first_name . '_' .$last_name . '_' .$date);
    $phone_number = $_POST["phone_number"];
    $email = $_POST["email"];
    $profession = $_POST["profession"];
    $employer = $_POST["employer"];
    $budget = $_POST["budget"];
    $property_type = $_POST["property_type"];
    $bedroom_number = $_POST["bedroom_number"];
    $unit_type = $_POST["unit_type"];
    $parking_lot = $_POST["parking_lot"];
    $locker = $_POST["locker"];
    $remarks = $_POST["remarks"];

    $total_files = count($_FILES['idfiles']['name']);
    for($i=0; $i<$total_files; $i++){
        $filename = str_replace(' ', '', $_FILES['idfiles']['name'][$i]);
        move_uploaded_file($_FILES['idfiles']['tmp_name'][$i], './upload/'.$full_name.'_'.$filename);
    }

    $myfile = fopen('./inputs/'.$full_name . ".txt", "w");
    fwrite($myfile, 'Property Name: '.$property_name.PHP_EOL);
    fwrite($myfile, 'Firstname: '.$first_name.PHP_EOL);
    fwrite($myfile, 'Lastame: '.$last_name.PHP_EOL);
    fwrite($myfile, 'Phone Number: '.$phone_number.PHP_EOL);
    fwrite($myfile, 'Email: '.$email.PHP_EOL);
    fwrite($myfile, 'Profession: '.$profession.PHP_EOL);
    fwrite($myfile, 'Employer: '.$employer.PHP_EOL);
    fwrite($myfile, 'Budget: '.$budget.PHP_EOL);
    fwrite($myfile, 'Property Type: '.$property_type.PHP_EOL);
    fwrite($myfile, 'Unit Type: '.$unit_type.PHP_EOL);
    fwrite($myfile, 'Bedroom Number: '.$bedroom_number.PHP_EOL);
    fwrite($myfile, 'Parking Lot: '.$parking_lot.PHP_EOL);
    fwrite($myfile, 'Locker: '.$locker.PHP_EOL);
    fwrite($myfile, 'Other Remarks: '.$remarks.PHP_EOL);
    fwrite($myfile, 'IP: '.$user_ip.PHP_EOL);
    fclose($myfile);
    
  }
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit