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

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/dokan/script/vendor/mollie/mollie-api-php/src/Guzzle/   drwxrwxrwx
Free 12.97 GB of 57.97 GB (22.37%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     RetryMiddlewareFactory.php (1.82 KB)      -rwxrwxrwx
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Mollie\Api\Guzzle;

use 
GuzzleHttp\Exception\ConnectException;
use 
GuzzleHttp\Exception\TransferException;
use 
GuzzleHttp\Middleware;
use 
GuzzleHttp\Psr7\Request;
use 
GuzzleHttp\Psr7\Response;

class 
RetryMiddlewareFactory
{
    
/**
     * The maximum number of retries
     */
    
const MAX_RETRIES 5;

    
/**
     * The amount of milliseconds the delay is being increased with on each retry.
     */
    
const DELAY_INCREASE_MS 1000;

    
/**
     * @param bool $delay default to true, can be false to speed up tests
     *
     * @return callable
     */
    
public function retry($delay true)
    {
        return 
Middleware::retry(
            
$this->newRetryDecider(),
            
$delay $this->getRetryDelay() : $this->getZeroRetryDelay()
        );
    }

    
/**
     * Returns a method that takes the number of retries and returns the number of milliseconds
     * to wait
     *
     * @return callable
     */
    
private function getRetryDelay()
    {
        return function (
$numberOfRetries) {
            return static::
DELAY_INCREASE_MS $numberOfRetries;
        };
    }

    
/**
     * Returns a method that returns zero milliseconds to wait
     *
     * @return callable
     */
    
private function getZeroRetryDelay()
    {
        return function (
$numberOfRetries) {
            return 
0;
        };
    }

    
/**
     * @return callable
     */
    
private function newRetryDecider()
    {
        return function (
            
$retries,
            
Request $request,
            
Response $response null,
            
TransferException $exception null
        
) {
            if (
$retries >= static::MAX_RETRIES) {
                return 
false;
            }

            if (
$exception instanceof ConnectException) {
                return 
true;
            }

            return 
false;
        };
    }
}

:: 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.0058 ]--