One Hat Cyber Team
Your IP :
3.147.84.138
Server IP :
192.145.235.60
Server :
Linux ngx365.inmotionhosting.com 5.14.0-427.33.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 30 09:45:56 EDT 2024 x86_64
Server Software :
Apache
PHP Version :
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
opt
/
sharedrads
/
__pycache__
/
View File Name :
fixwpcron.cpython-39.pyc
a �g� � @ sz d Z ddlZddlZddlZddlZddlZddlZddlmZ dd� Z dd� Z dd � Zd d� Zdd � Z edkrve � dS )ay wp-cron was a hacky Wordpress feature added to compensate for Windows's lack of scheduling system. Certain plugins can trigger very poor behavior that causes it to be run every time anything happens on the site. The end result is dozens of thousands of redundant hits to wp-cron.php. This script disables the wp-cron feature, and sets up a cronjob to run once every three hours� N)� is_cpuserc C s& t jtd�} | jdd�}|jdddtjjdd� d }t� � }|d krV|jdd|d � n|jddd|d� | � � }|jr�tj�|j�s�t� |j� d�� z.|j�d�d dks�J �|j�d�d |_W n ttfy� t� d� Y n0 t|d�s�d|_|j�r||_t|j��s"t� |j� d�� |S )zParse commandline args)�descriptionT)Zrequiredz--pathz-p�PATHz�path to wordpress installation. If using this argument, we assume the customer has not modified the site to have wp-config.php in an alternate directory. Both wp-config.php and wp-cron.php should be present in the supplied directory)�metavar�type�helpz�Set this up for every WordPress installation that the user owns. Installations modified to have wp-config.php in an alternate folder for security are supported; wp-config.php and wp-cron.php files will be located separately �rootz--userz-u)r z--allz-a� store_true)�actionr z does not exist�/� �home� z-Incorrect path. Should be in a user's homedir�allFz is not a cPanel user)�argparse�ArgumentParser�__doc__Zadd_mutually_exclusive_group�add_argument�os�path�realpath�getpassZgetuser� parse_args�isdir�sys�exit�split�user�AssertionError� IndexError�hasattrr r )�parser�groupZall_helpZcurrent_user�args� r$ �./opt/sharedrads/fixwpcron.pyr s8 � r c C s� t | dd��}|�� }W d � n1 s*0 Y t|�D ]l\}}d|v r<||d dkrltd| � dS ||d dkr�d||d <