0x1949 Team - FAZEMRX - MANAGER
Edit File: frontend.cpython-310.pyc
o �Fa�� � @ sz d Z ddlZddlZddlZddlmZ ddlZddlmZm Z m Z ddlmZ ddl Zdd� Zdd � ZG d d� d�ZdS )z'frontend.py: frontend interface for ufw� N)�UFWError)�error�warn�msg)�UFWBackendIptablesc C s� t j�� }dD ]}|�t j�|�� qdD ]}|�t j�|�� qdD ]}|�t j�|�� q#dD ]}|�t j�|�� q1dD ]}|�t j�|�� q?dD ]}|�t j� |�� qMg d�}|D ]}|�t j� |�� |�t j�|�� q_t| �dkr�d }| | � � d kr�d}| | � � dkr�| | � � dkr�| | � � |v r�| �|d � t| �dk s�d | v r�t| �dk r�td� z|�| d d� �}W |S ty� } ztd|j � W Y d}~|S d}~w ty� tddd� � w )zEParse command. Returns tuple for action, rule, ip_version and dryrun.)�enable�disable�helpz--help�versionz --version�reload�reset)�list�info�default�update)�on�off�low�medium�high�full)�allow�deny�reject)N�verbose�numbered)�rawzbefore-rulesz user-ruleszafter-rulesz logging-rules�builtins� listening�added)r �limitr r �insert�delete�prepend� � � --dry-runr �route�rule� znot enough argsNz%szInvalid syntaxF)�do_exit)�ufw�parser� UFWParser�register_command�UFWCommandBasic� UFWCommandApp�UFWCommandLogging�UFWCommandDefault�UFWCommandStatus�UFWCommandShow�UFWCommandRule�UFWCommandRouteRule�len�lowerr! r � parse_commandr �value� Exception)�argv�p�i� rule_commands�idx�pr�e� rC �./usr/lib/python3/dist-packages/ufw/frontend.pyr9 sL ����r9 c C s� t di dtjj�dd�dd�dd�dd�d d �dd�d d�dd�dd�dd�dd�dd�dd�dd�dd�dd�i d d!�d"d#�d$d%�d&d'�d(d(�d)d)�d*d*�d+d,�d-d.�d/d0�d1d2�d3d3�d4d5�d6d7�d8d9�d:d;�d<d=��d>d?i� �} | S )@zPrint help messagea+ Usage: %(progname)s %(command)s %(commands)s: %(enable)-31s enables the firewall %(disable)-31s disables the firewall %(default)-31s set default policy %(logging)-31s set logging to %(level)s %(allow)-31s add allow %(rule)s %(deny)-31s add deny %(rule)s %(reject)-31s add reject %(rule)s %(limit)-31s add limit %(rule)s %(delete)-31s delete %(urule)s %(insert)-31s insert %(urule)s at %(number)s %(prepend)-31s prepend %(urule)s %(route)-31s add route %(urule)s %(route-delete)-31s delete route %(urule)s %(route-insert)-31s insert route %(urule)s at %(number)s %(reload)-31s reload firewall %(reset)-31s reset firewall %(status)-31s show firewall status %(statusnum)-31s show firewall status as numbered list of %(rules)s %(statusverbose)-31s show verbose firewall status %(show)-31s show firewall report %(version)-31s display version information %(appcommands)s: %(applist)-31s list application profiles %(appinfo)-31s show information on %(profile)s %(appupdate)-31s update %(profile)s %(appdefault)-31s set default application policy �progname�command�COMMAND�commands�Commandsr r r zdefault ARG�loggingz logging LEVEL�level�LEVELr z allow ARGSr( r z deny ARGSr zreject ARGSr z limit ARGSr"