One Hat Cyber Team
Your IP :
3.14.254.47
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 :
move_generator.cpython-39.pyc
a �g�( � @ s� d Z ddlmZ ddlmZ ddlZddlZddlZddlm Z ddl mZmZ ddl mZ ddlZddlZddlmZ ddlZe d �Zd Zdd� Zd d� Zdd� Zed�dd�Zee d�dd�Zeeef dd�dd�Zdd�dd�Zeeee ee e!eee"df f d�dd�Z#eeee ee ee!eee"f d�d d!�Z$d"d#� Z%ee!eee"f d$�d%d&�Z&eee"d'�d(d)�Z'e(d*k�r�e� dS )+zWDisk Move Generator - generates disk move tickets according to arguments and exclusions� )� itemgetter)�nodeN)�Path)�ThreadPoolExecutor�as_completed)�Union)�tabulatez/var/log/disk_exclude� c C s� t jtd�} | �� }| jddtddg dd� | jdd td dd� | jd dtdd� | jddtdd� |jddtddg dd� |jddddd� | jddddd� | jd d!dd"d� | �� }|jd#u r�|j d#u r�|j s�td$d%� t� d&� |S )'zParse arguments)�descriptionz-az--add�add_user�+z3Add user to exclusion list. Entries survive 30 days)�type�dest�nargs�default�helpz-mz--min� z3Minimum size of account to migrate in GB, default 8)r r r z-xz--maxz(Maximum size of account to migrate in GB)r r z-tz--totalz<Lists several eligible accounts whose size totals up to X GBz-ez --exclude�exc_userz1List of users to exclude alongside exclusion listz-nz--noexclude� store_truezDo not use exclusion list)�actionr z-lz --listaccountzPrint list of eligible accountsz-dz--ticketz/Email eligible accounts to the disk moves queueFz"--ticket (-d), --listaccount (-l),z or --add (-a) [user] is required� )�argparse�ArgumentParser�__doc__Zadd_mutually_exclusive_group�add_argument�str�int� parse_args�ticket�listaccountr �print�sys�exit)�parser�group�args� r&