AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/twisted/mail/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/twisted/mail/__pycache__/bounce.cpython-310.pyc
o

�bb�@sNdZddlZddlZddlZddlmZmZmZddl	m
Z
dZd
dd	�ZdS)z(
Support for bounce message generation.
�N)�SEEK_END�SEEK_SET�StringIO)�smtpa]From: postmaster@{failedDomain}
To: {failedFrom}
Subject: Returned Mail: see transcript for details
Message-ID: {messageID}
Content-Type: multipart/report; report-type=delivery-status;
    boundary="{boundary}"

--{boundary}

{transcript}

--{boundary}
Content-Type: message/delivery-status
Arrival-Date: {ctime}
Final-Recipient: RFC822; {failedTo}
��utf-8c
CsVt|t�r
|�|�}t|t�r|�|�}|sdj|d�}tj�|�d}d�t��t�	�d�t�
t���||�dd�d||tj
dd�||d	�	}t�}|�tjdi|���|��}|�d
t�|��}	|�|t�|	dkr�	|��}
t|
t�r}|
�|�}
t|
�d
kr�n|�|
�qon|��}t|t�r�|�|�}|�|�d|�|�|���|�fS)a^
    Generate a bounce message for an undeliverable email message.

    @type message: a file-like object
    @param message: The undeliverable message.

    @type failedFrom: L{bytes} or L{unicode}
    @param failedFrom: The originator of the undeliverable message.

    @type failedTo: L{bytes} or L{unicode}
    @param failedTo: The destination of the undeliverable message.

    @type transcript: L{bytes} or L{unicode}
    @param transcript: An error message to include in the bounce message.

    @type encoding: L{str} or L{unicode}
    @param encoding: Encoding to use, default: utf-8

    @rtype: 3-L{tuple} of (E{1}) L{bytes}, (E{2}) L{bytes}, (E{3}) L{bytes}
    @return: The originator, the destination and the contents of the bounce
        message.  The destination of the bounce message is the originator of
        the undeliverable message.
    zzI'm sorry, the following address has permanent errors: {failedTo}.
I've given up, and I will not retry the message again.
)�failedTo�z{}_{}_{}�XXXXX�@�bounce)�uniq)	�boundary�ctime�
failedAddress�failedDomain�
failedFromr�	messageID�message�
transcriptri'�N�)�
isinstance�bytes�decode�format�email�utils�	parseaddr�time�os�getpidr�splitr�	messageidr�write�
BOUNCE_FORMAT�tell�seekrr�readline�len�read�encode�getvalue)rrrr�encodingr�data�fp�orig�sz�line�messageContentrr�5/usr/lib/python3/dist-packages/twisted/mail/bounce.py�generateBounce$sR



�
�


�


r5)rr)
�__doc__�email.utilsrr r�iorrr�twisted.mailrr%r5rrrr4�<module>s

Anon7 - 2022
AnonSec Team