Server IP : 104.244.120.118  /  Your IP : 216.73.216.198
Web Server : Apache
System : Linux ded5817.inmotionhosting.com 5.14.0-741.22.1.el9_9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 12 14:34:46 UTC 2026 x86_64
User : persoanlinjuryla ( 1006)
PHP Version : 8.5.13
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF
Directory (0755) :  /../../opt/dedrads/python/../python/../python/../python/../__pycache__/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //../../opt/dedrads/python/../python/../python/../python/../__pycache__/check_prov.cpython-313.pyc
�

�i�jj���SSKrSSKrSSKrSSKrSSKJrJrJr SSK	r	Sr
SrSrSr
SrSrS	\S
\4SjrSrS
rSrSr\S:Xa\"5 gg)�N)�
interfaces�ifaddresses�AF_INETz/root/prov_logc��/n[5HEn[[U5;dM[U5[HnURUS5 M MG U$)z(List ipv4 addresses setup on this system�addr)rrr�append)�ip_list�	interface�links   �/opt/dedrads/check_prov.py�
ip4_addressesr
sK���G��\�	��k�)�,�,�#�I�.�w�7�����t�F�|�,�8�"��N�c��Sn[SSS9nUR5HFnUR5(dMUR5SS:XdM3UR5SnMH SSS5 U$!,(df   U$=f)zbThis should only be run on brand new vps. so there will be 2 IP's.
The main IP and a local addressNz/etc/wwwacct.confzutf-8)�encodingr�ADDR�)�open�	readlines�strip�split)�main_ip�f�lines   r�
get_mainiprsq���G�	
�!�G�	4���K�K�M�D��:�:�<�<���z�z�|�A��&�(��*�*�,�q�/��	"�
5��N�

5�	4��N�s�AA2�A2�2
Bc�n�S[l[R"5n[	5n[R
"U5n[
US-U-5 SnUHnXR:XaUnMM XB:Xa[
US-U-5 g[
S5 g![a n[
S5 [
U5 SnAgSnAff=f)z4Check that forward and reverse DNS is setup properlyrz
 resolves to zA record for hostname not foundNFTz2Reverse DNS either doesn't match or is not present)�sys�tracebacklimit�socket�getfqdnr
�
gethostbyname�print�	Exception)�vps_hostname�vps_ips�hostname_ip�er�ips      r�	check_dnsr((s����C���>�>�#�L��o�G���*�*�<�8��
�l�_�,�{�:�;��G���
���G��	�
��
�g��'�,�6�7��	�
>�?�����
�/�0�
�a�����s�'B
�

B4�B/�/B4c���[5n/SQn/nUH�n[RR5nSR	[[
U5RS555S-U-nURUS5nURUS5nURSU<SU<SUS<S	US<S
3	5 M� [U5S:�agg![RRa M�f=f)
z3Ripped this straight from google. it does the trick)zzen.spamhaus.orgz
spam.abuse.chzcbl.abuseat.orgzvirbl.dnsbl.bit.nlz
dnsbl.inps.dezix.dnsbl.manitu.netzdnsbl.sorbs.netzbl.spamcop.netzxbl.spamhaus.orgzpbl.spamhaus.orgzdb.wpbl.info�.�A�TXTzIP: z IS listed in z (rz: �)FT)r�dns�resolver�Resolver�join�reversed�strr�resolver�NXDOMAIN�len)�my_ip�bls�listings�bl�my_resolver�query�answers�
answer_txts        r�check_mailipr?Cs����L�E��C��H���	��,�,�/�/�1�K��H�H�X�c�%�j�&6�&6�s�&;�<�=��C�b�H�E�!�)�)�%��5�G�$�,�,�U�E�:�J��O�O��"�g�a�j�*�Q�-�9�
�
��8�}�q������|�|�$�$�	��	�s�B"C�C0�/C0c��/n[R"S5H u pUHnURU5 M M" URS5 [U5S:a[
S5 g[
USS-5 g![a N9f=f)	z8Check if the reseller user was setup during provisioningz/var/cpanel/users�systemrz Reseller user not setup properlyFrz setup as reseller userT)�os�walkr�remover"r6r!)�	user_list�_�files�files    r�check_user_setuprIhs����I��w�w�2�3���1��D����T�"��4�
�����"��9�~���
�0�1��	�)�A�,�2�
2�3���
�
��
�s�A<�<
B	�B	�subject�bodyc��[R"SXS9 [S5 g![Ra%n[SU3[R
S9 SnAgSnAff=f)Nzsadmin@imhadmin.net)�destrJrKzT2S notifiedzFailed to create ticket - )rH)�rads�make_ticketr!�TicketErrorr�stderr)rJrK�excs   r�create_taskrSysR������3�W�P�	�n������C�
�*�3�%�0�s�z�z�B��C�s�#�A�A�Az�One or more of the DNS setup checks failed. Please check that both forward and reverse DNS is setup properly for this VPS containerz�The container was setup with a blacklisted or otherwise bad mail IP. Please review the mail ip of the server and rotate/delist as neededzmThe reseller user was not found on this server after provisioning. Please check why, and setup user if neededc�x�[R"5S-n[5(d[S5 [	U[
5 O[S5 [
5(d[S5 [	U[5 O[S5 [5(d[S5 [	U[5 g[S5 g)Nz provisioning check failurezDNS checks failedzDNS checks passedzMail IP checks failedzMail IP checks passedzUser setup checks failedzUser setup checks passsed)
rrr(r!rS�DNS_SETUP_ERRORr?�
MAIL_IP_ERRORrI�USER_SETUP_ERROR)rJs r�mainrX�s����n�n��!>�>�G��;�;�
�!�"��G�_�-�
�!�"��>�>�
�%�&��G�]�+�
�%�&����
�(�)��G�-�.�
�)�*r�__main__)rrBr�dns.resolverr.�	netifacesrrrrN�LOG_FILEr
rr(r?rIr3rSrUrVrWrX�__name__�rr�<module>r_s���
�	�
��7�6�����
��6"�J�"���C��G��
J��
*��+�&�z���F�r