Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/vhost/itmtrsrv.arukustech.com/api/utils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhost/itmtrsrv.arukustech.com/api/utils/__pycache__/emailer.cpython-312.pyc
�

2y�in��t�ddlZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
d�Zd�Zd	�Zd
�Zy)�N)�
MIMEMultipart)�MIMEText)�	MIMEImage)�urlparse)�EMAIL�EMAIL_CRED_FILEc�0�t|�}|jS)N)r�netloc)�url�parseds  �=/var/www/html/servermonitor.tsdemo.co.in/api/utils/emailer.py�	clean_urlrs��
�c�]�F��=�=��c��i}tt�5}|D]/}d|vs�|j�jdd�\}}|||<�1	ddd�|S#1swY|SxYw)N�=�)�openr�strip�split)�creds�f�line�k�vs     r
�
load_credsrsj���E�	
�o�	��!��	�D��d�{��z�z�|�)�)�#�q�1���1���a��	��
�L��
�L�s�
A�*A�Ac
���t�}d|�d|��}td�}td|d<td|d<||d<td	�}|j|�d
|�d|�d|�d
t	j
d��d�	}|jt
|d��	tjjtjjt�d�}tjj|�ret|d�5}	t|	j��}
|
j!dd�|
j!ddd��|j|
�ddd�t%j&tdtd�5}|j)�|j+|d|d�|j-|�ddd�y#1swY�pxYw#t"$rY�~wxYw#1swYyxYw)Nz[CRITICAL] z	 Alert - �related�sender�From�receiver�To�Subject�alternativea�
    <html>
    <body style="margin:0;padding:0;background-color:#f8fafc;font-family:Arial,sans-serif;">
        <div style="max-width:600px;margin:20px auto;background-color:#ffffff;
                    border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;">
            <div style="background-color:#ced9eb;padding:20px;text-align:center;">
                <img src="cid:techsum_logo" alt="TechSum" style="width:150px;">
            </div>
            <div style="padding:30px;">
                <h2 style="color:#1e293b;margin-top:0;">Server Alert</h2>
                <table cellpadding="10" style="width:100%;">
                    <tr><td><b>Server</b></td><td align="right">zd</td></tr>
                    <tr><td><b>Alert</b></td><td align="right" style="color:#ef4444;"><b>zP</b></td></tr>
                    <tr><td><b>Message</b></td><td align="right">zI</td></tr>
                    <tr><td><b>Time</b></td><td align="right">z%d-%b-%Y %H:%M:%Szf IST</td></tr>
                </table>
            </div>
        </div>
    </body>
    </html>
    �html�TechSum_logo.png�rb�
Content-ID�<techsum_logo>�Content-Disposition�inline��filename�smtp_server�	smtp_port�AWS_SMTP_USERNAME�AWS_SMTP_PASSWORD)rrr�attach�time�strftimer�os�path�join�dirname�__file__�existsrr�read�
add_header�	Exception�smtplib�SMTP�starttls�login�send_message)�server_name�
alert_type�messager�subject�msg�msg_alternativer$�	logo_pathr�img�ss            r
�send_server_alertrKs����L�E��J�<�y��
�>�G�
�	�
"�C���/�C��K��j�!�C��I��C�	�N�#�M�2�O��J�J���A�BM�
�NZ�Zd�Ye�fB�BI��K?�?C�}�}�M`�?a�>b�c��D�,���8�D�&�1�2�	
��G�G�L�L�������!:�<N�O�	�
�7�7�>�>�)�$��i��&�
 �!������)�����|�-=�>����4�h�I[��\��
�
�3��	
 �
���e�M�*�E�+�,>�	?��1�	�
�
��	����)�*�E�2E�,F�G�	���s����
 �
 ��
�
��
����s8�A,G
�AG�G
�>:G�G
�G
�
	G�G�G%c�z�t�}td�}td|d<||d<d|d<td�}|j|�d|�d	�}|jt	|d
��	t
jjt
jjt�d�}t
jj|�ret|d�5}t|j��}|jd
d�|jddd��|j|�ddd�t!j"tdtd�5}	|	j%�|	j'|d|d�|	j)|�ddd�y#1swY�pxYw#t$rY�~wxYw#1swYyxYw)Nrrrr!z#Reset your TechSum Monitor passwordr"r#a3
    <html>
    <body style="background:#f2f4f7;font-family:Arial,sans-serif;">
        <div style="max-width:500px;margin:40px auto;background:#ffffff;
                    border-radius:12px;overflow:hidden;">
            <div style="background:#1e293b;padding:20px;text-align:center;">
                <img src="cid:techsum_logo" style="width:140px;">
            </div>
            <div style="padding:30px;text-align:center;">
                <h2>Password Reset</h2>
                <p>This link will expire in <b>30 minutes</b>.</p>
                <a href="a}" style="
                    display:inline-block;
                    padding:12px 24px;
                    background:#4f46e5;
                    color:#fff;
                    text-decoration:none;
                    border-radius:8px;
                    font-weight:bold;
                ">Reset Password</a>
            </div>
        </div>
    </body>
    </html>
    r$r%r&r'r(r)r*r+r-r.r/r0)rrrr1rr4r5r6r7r8r9rrr:r;r<r=r>r?r@rA)
�
user_email�
reset_linkrrFrGr$rHrrIrJs
          r
�send_password_reset_emailrOXs����L�E�
�	�
"�C���/�C��K��C��I�:�C�	�N�#�M�2�O��J�J����%��
&��D�4���8�D�&�1�2�	
��G�G�L�L�������!:�<N�O�	�
�7�7�>�>�)�$��i��&�
 �!������)�����|�-=�>����4�h�I[��\��
�
�3��	
 �
���e�M�*�E�+�,>�	?��1�	�
�
��	����)�*�E�2E�,F�G�	���s����
 �
 ��
�
��
����s8�*A,F"�AF�'F"�:F1�F�F"�"	F.�-F.�1F:)r2r=r4�email.mime.multipartr�email.mime.textr�email.mime.imager�urllib.parser�config.settingsrrrrrKrO�rr
�<module>rVs2����	�.�$�&�!�2��
�4�t6r

Youez - 2016 - github.com/yon3zu
LinuXploit