!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/5.6.40 

uname -a: Linux cpanel06wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.80.el6.x86_64 #1 SMP Thu Sep 24
01:42:00 EDT 2020 x86_64
 

uid=851(cp949260) gid=853(cp949260) groups=853(cp949260) 

Safe-mode: OFF (not secure)

/home/cp949260/public_html/phbcoop.com/vendor/rs-plugin/php/twitter/connection/   drwxr-xr-x
Free 235.26 GB of 981.82 GB (23.96%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ConnectionAbstract.php (2.8 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace TwitterPhp\Connection;

/**
 * Class Base
 * @package TwitterPhp
 * @subpackage Connection
 */
abstract class Base
{
    
/**
     * Url for Twitter api
     */
    
const TWITTER_API_URL 'https://api.twitter.com';

    
/**
     * Twitter URL that authenticates bearer tokens
     */
    
const TWITTER_API_AUTH_URL 'https://api.twitter.com/oauth2/token/';

    
/**
     * Version of Twitter api
     */
    
const TWITTER_API_VERSION '1.1';

    
/**
     * Timeout value for curl connections
     */
    
const DEFAULT_TIMEOUT 10;

    
/**
     * METHOD GET
     */
    
const METHOD_GET 'GET';

    
/**
     * METHOD POST
     */
    
const METHOD_POST 'POST';

    
/**
     * @param string $url
     * @param array $parameters
     * @param $method
     * @return array
     */
    
abstract protected function _buildHeaders($url,array $parameters null,$method);


    
/**
     * Do GET request to Twitter api
     *
     * @link https://dev.twitter.com/docs/api/1.1
     *
     * @param $resource
     * @param array $parameters
     * @return mixed
     */
    
public function get($resource, array $parameters = array())
    {
        
$url $this->_prepareUrl($resource);
        
$headers $this->_buildHeaders($url,$parameters,self::METHOD_GET);
        
$url $url '?' http_build_query($parameters);
        
$curlParams = array (
            
CURLOPT_URL => $url,
            
CURLOPT_HTTPHEADER => $headers
        
);

        return 
$this->_callApi($curlParams);
    }

    
/**
     * Do POST request to Twitter api
     *
     * @link https://dev.twitter.com/docs/api/1.1
     *
     * @param $resource
     * @param array $parameters
     * @return mixed
     */
    
public function post($resource, array $parameters = array())
    {
        
$url $this->_prepareUrl($resource);
        
$headers $this->_buildHeaders($url,$parameters,self::METHOD_POST);
        
$curlParams = array (
            
CURLOPT_URL => $url,
            
CURLOPT_POST => 1,
            
CURLOPT_POSTFIELDS => $parameters,
            
CURLOPT_HTTPHEADER => $headers
        
);

        return 
$this->_callApi($curlParams);
    }

    
/**
     * Call Twitter api
     *
     * @param array $params
     * @return array
     */
    
protected function _callApi(array $params)
    {
        
$curl curl_init();
        
curl_setopt_array($curl,$params);
        
curl_setopt($curlCURLOPT_HEADER0);
        
curl_setopt($curlCURLOPT_RETURNTRANSFER1);
        
curl_setopt($curlCURLOPT_CONNECTTIMEOUTself::DEFAULT_TIMEOUT);
        
$response curl_exec($curl);
        return 
json_decode($response,true);
    }

    
/**
     * @param string $resource
     * @return string
     */
    
private function _prepareUrl($resource)
    {
        return 
self::TWITTER_API_URL '/' self::TWITTER_API_VERSION '/' ltrim($resource,'/') . '.json';
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0681 ]--