403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.59
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,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 : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/gpa/chat/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/gpa/chat/index.php
<?
     ob_start();
     include("config.php"); //ค่ากำหนด

     $user=(isset($_GET["username"]))?$_GET["username"]:$_GET["user"];

     if (empty($room[$roomname])) { //ไม่ได้กำหนดห้องมา ใช้ห้องแรกสุดเลย
          $rooms=each($room);
          $roomname=$rooms[0];
     }
     
     if (empty($user) || $user=="") include("login.php"); //แสดงหน้า login
     else { //กำหนด user มาแสดงว่าผ่านการ login มาแล้ว ตรวจสอบว่ามี user นี้อยู่แล้วหรือไม่
     
          $usersfile="$data$roomname.user"; //ข้อมูลในไฟล์ user|ip|index|time
          $online=false; //กำหนดไว้ก่อนว่ายังไม่มี
          $validtime=time()-$gap; //เวลาที่ยังอยู่บนระบบ
          
          if (file_exists($usersfile)) { //อ่านรายชื่อคน บนระบบ
               $fr=file($usersfile); //อ่านลงใน แอเรย์
               $chkuser=strtolower($user); //ชื่อ user ตัวพิมเล็กเอาไว้ตรวจสอบ
               $ip = $_SERVER["REMOTE_ADDR"]; //ค่า IP Address
               for ($i=0; $i<count($fr) && $online==false; $i++) { //ตรวจสอบว่ามี user นี้หรือไม่
                    $datas=explode("|", $fr[$i]); //แยก user ที่ i ลงในแอเรย์
                    $online=(strtolower($datas[0])==$chkuser && $datas[1]!=$ip && $validtime<(int)$datas[3]); //จะ่ online อยู่ ถ้า ชื่อซ้ำ  และ IP ไม่ตรงกัน และ ยังอยู่ในเวลา
               }
          }
          
          if ($online==false) { //ลงทะเบียนสำเร็จ
               setCookie("user", $user, time() + 3600 * 24 * 365); //ลงทะเบียน user ลง cookie สำหรับการเปิดครั้งต่อไปนาน 1 ปี
               include("chat.php"); //เข้าห้อง chat
          } else { //มีชื่อนี้ online อยู่แล้ว
               $user="";
               include("login.php"); //แสดงหน้า login
          }
     }
?>

Youez - 2016 - github.com/yon3zu
LinuXploit