!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/ecom1.picotech.app/public_html/vendor/laravel/framework/src/Illuminate/Cache/   drwxr-xr-x
Free 28.71 GB of 117.98 GB (24.33%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     RateLimiter.php (4.93 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Illuminate\Cache;

use 
Closure;
use 
Illuminate\Contracts\Cache\Repository as Cache;
use 
Illuminate\Support\InteractsWithTime;

class 
RateLimiter
{
    use 
InteractsWithTime;

    
/**
     * The cache store implementation.
     *
     * @var \Illuminate\Contracts\Cache\Repository
     */
    
protected $cache;

    
/**
     * The configured limit object resolvers.
     *
     * @var array
     */
    
protected $limiters = [];

    
/**
     * Create a new rate limiter instance.
     *
     * @param  \Illuminate\Contracts\Cache\Repository  $cache
     * @return void
     */
    
public function __construct(Cache $cache)
    {
        
$this->cache $cache;
    }

    
/**
     * Register a named limiter configuration.
     *
     * @param  string  $name
     * @param  \Closure  $callback
     * @return $this
     */
    
public function for(string $nameClosure $callback)
    {
        
$this->limiters[$name] = $callback;

        return 
$this;
    }

    
/**
     * Get the given named rate limiter.
     *
     * @param  string  $name
     * @return \Closure|null
     */
    
public function limiter(string $name)
    {
        return 
$this->limiters[$name] ?? null;
    }

    
/**
     * Attempts to execute a callback if it's not limited.
     *
     * @param  string  $key
     * @param  int  $maxAttempts
     * @param  \Closure  $callback
     * @param  int  $decaySeconds
     * @return mixed
     */
    
public function attempt($key$maxAttemptsClosure $callback$decaySeconds 60)
    {
        if (
$this->tooManyAttempts($key$maxAttempts)) {
            return 
false;
        }

        if (
is_null($result $callback())) {
            
$result true;
        }

        return 
tap($result, function () use ($key$decaySeconds) {
            
$this->hit($key$decaySeconds);
        });
    }

    
/**
     * Determine if the given key has been "accessed" too many times.
     *
     * @param  string  $key
     * @param  int  $maxAttempts
     * @return bool
     */
    
public function tooManyAttempts($key$maxAttempts)
    {
        if (
$this->attempts($key) >= $maxAttempts) {
            if (
$this->cache->has($this->cleanRateLimiterKey($key).':timer')) {
                return 
true;
            }

            
$this->resetAttempts($key);
        }

        return 
false;
    }

    
/**
     * Increment the counter for a given key for a given decay time.
     *
     * @param  string  $key
     * @param  int  $decaySeconds
     * @return int
     */
    
public function hit($key$decaySeconds 60)
    {
        
$key $this->cleanRateLimiterKey($key);

        
$this->cache->add(
            
$key.':timer'$this->availableAt($decaySeconds), $decaySeconds
        
);

        
$added $this->cache->add($key0$decaySeconds);

        
$hits = (int) $this->cache->increment($key);

        if (! 
$added && $hits == 1) {
            
$this->cache->put($key1$decaySeconds);
        }

        return 
$hits;
    }

    
/**
     * Get the number of attempts for the given key.
     *
     * @param  string  $key
     * @return mixed
     */
    
public function attempts($key)
    {
        
$key $this->cleanRateLimiterKey($key);

        return 
$this->cache->get($key0);
    }

    
/**
     * Reset the number of attempts for the given key.
     *
     * @param  string  $key
     * @return mixed
     */
    
public function resetAttempts($key)
    {
        
$key $this->cleanRateLimiterKey($key);

        return 
$this->cache->forget($key);
    }

    
/**
     * Get the number of retries left for the given key.
     *
     * @param  string  $key
     * @param  int  $maxAttempts
     * @return int
     */
    
public function remaining($key$maxAttempts)
    {
        
$key $this->cleanRateLimiterKey($key);

        
$attempts $this->attempts($key);

        return 
$maxAttempts $attempts;
    }

    
/**
     * Get the number of retries left for the given key.
     *
     * @param  string  $key
     * @param  int  $maxAttempts
     * @return int
     */
    
public function retriesLeft($key$maxAttempts)
    {
        return 
$this->remaining($key$maxAttempts);
    }

    
/**
     * Clear the hits and lockout timer for the given key.
     *
     * @param  string  $key
     * @return void
     */
    
public function clear($key)
    {
        
$key $this->cleanRateLimiterKey($key);

        
$this->resetAttempts($key);

        
$this->cache->forget($key.':timer');
    }

    
/**
     * Get the number of seconds until the "key" is accessible again.
     *
     * @param  string  $key
     * @return int
     */
    
public function availableIn($key)
    {
        
$key $this->cleanRateLimiterKey($key);

        return 
max(0$this->cache->get($key.':timer') - $this->currentTime());
    }

    
/**
     * Clean the rate limiter key from unicode characters.
     *
     * @param  string  $key
     * @return string
     */
    
public function cleanRateLimiterKey($key)
    {
        return 
preg_replace('/&([a-z])[a-z]+;/i''$1'htmlentities($key));
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0052 ]--