!C99Shell v. 1.0 pre-release build #13!

Software: Apache. PHP/5.5.15 

uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 

SYSTEM 

Safe-mode: OFF (not secure)

E:\xampp\xampp\htdocs\phpold\AjaxPhpCode\Chapter03\ajax\foundations\friendly\   drwxrwxrwx
Free 7.95 GB of 239.26 GB (3.32%)
Detected drives: [ a ] [ c ] [ d ] [ e ] [ f ]
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     friendly.class.php (2.21 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
// load error handling sequence
require_once ('error_handler.php');
// load configuration
require_once ('config.php');

// class stores Friendly web application functionality
class Friendly
{
  
// stores the database connection
  
private $mMysqli;
    
  
// constructor opens database connection
  
function __construct()
  {
    
$this->mMysqli = new mysqli(DB_HOSTDB_USERDB_PASSWORD
                                                     
DB_DATABASE);
  }

  
// generate news message
  
public function getNews()
  {
    
// this will store the news line
    
$news 'No news for today.';
    
// SQL that selects two random users from the database.
    
$query 'SELECT user_name FROM users ' .
             
'ORDER BY RAND() ' .
             
'LIMIT 2';
    
// execute the query
    
$result $this->mMysqli->query($query);  
    
// retrieve the user rows
    
$row1 $result->fetch_array(MYSQLI_ASSOC);
    
$row2 $result->fetch_array(MYSQLI_ASSOC);
    
// close the input stream
    
$result->close();  
    
// generate the news
    
if (!$row1 || !$row2)
    {
      
$news 'The project needs more users!';
    }
    else
    {
 
      
// create HTML-formatted news message
      
$name1 '<b>' $row1['user_name'] . '</b>';
      
$name2 '<b>' $row2['user_name'] . '</b>';
      
$randNum $this->getRandomNumber();
      
$news 'User ' $name1 ' works with user ' $name2 
              
' at project #' $randNum '.';
    }
    
// output the news line
    
return $news;
  }
  
  
// returns a random number between 1 and 100 
  
private function getRandomNumber()
  {
    
// delays execution for quarter of a second
    
usleep(250000);
    
// holds the remote server address and parameters
    
$serverAddress 'http://www.random.org/cgi-bin/randnum';
    
$serverParams 'num=1&min=1&max=100';
    
// retrieve the random number from remote server
    
$randomNumber file_get_contents($serverAddress '?' 
                                                      
$serverParams);
    
// output the random number
    
return trim($randomNumber);
  }

  
// destructor closes database connection
  
function __destruct()
  {
    
$this->mMysqli->close();      
  }
}
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0312 ]--