HEX
Server: LiteSpeed
System: Linux cpir1.prohostdns.com 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP Thu May 7 23:17:13 UTC 2026 x86_64
User: pelakir (2976)
PHP: 8.2.31
Disabled: exec, shell_exec, system, passthru, proc_open, proc_close, proc_terminate, proc_get_status, popen, pclose, pcntl_exec
Upload Files
File: //usr/lib/python3.6/site-packages/sshuttle/__pycache__/options.cpython-36.opt-1.pyc
3

��^�!�
@s�ddlZddlZddlmZmZmZddlmZdd�Z	dd�Z
dd	�Zd
d�ZGdd
�d
e�Z
edddd�Zejddde
dd�ejddddd�ejddddd �ejd!d"dd#d �ejd$dd%d �ejd&d'ged(d)�ejd*d+ed,d-�ejd.d/d0d1d2d3d4gd5d/d6d7�ejd8d9d:d�ejd;d<d=d>d�ejd?d@dAdBge
dCdD�ejdEdFd9e
dGe	dHdI�ejdJdKdLddMdN�ejdOdPdQedRdS�ejdTdUdVdWdXdY�ejdZd[gd\dY�ejd]d^d_d`da�ejdbdcedddedfdg�ejdhdiedjd-�ejdkddld �ejdmdnddod �ejdpdqd9e
drge	dsdt�ejduddvd �ejdwd9dxdydY�ejdzd{d|�ejd}dd~d �ejddd~d �ejd�dd�d �ejd�dd�d �ejd�d�d�d��ejd�d�d�d��ejd�d^d�d�da�dS)��N)�ArgumentParser�Action�ArgumentTypeError)�__version__cCs�yt|d�}Wn tk
r.td|��YnX|j�}g}x>t|�D]2\}}|j�}|s\qF|ddkrjqF|jt|��qFW|S)N�rzUnable to open subnet file: %sr�#)�open�OSError�Fatal�	readlines�	enumerate�strip�append�parse_subnetport)�sZhandleZraw_config_lines�subnets�_�line�r�/usr/lib/python3.6/options.py�parse_subnetport_file	srcCs�|jd�dkrd}nd}tj||�}|s4td|��|j�\}}}}ytj|ddtj�}Wn"tjk
r|td|��YnXt	|�\}}	}	}	}|tj
kr�dnd	}
t|p�|
�}d|ko�|
kns�td
||
f��||d|t|p�d�t|p�|p�d�fS)N�:�z4(?:\[?([\w\:]+)(?:/(\d+))?]?)(?::(\d+)(?:-(\d+))?)?$z-([\w\.\-]+)(?:/(\d+))?(?::(\d+)(?:-(\d+))?)?$z*%r is not a valid address/mask:port formatrzUnable to resolve address: %s� �z width %d is not between 0 and %d)�count�re�matchr
�groups�socket�getaddrinfo�SOCK_STREAM�gaierror�minZAF_INET�int)r�rx�m�addr�widthZfportZlport�addrinfo�familyrZ	max_widthrrrrs"rc	
Cs�t|�}|j�rd}nd|kr$d}nd}tj||�}|sDtd|��|j�\}}|pVd}t|p`d�}ytj||dtj	�}Wn"tj
k
r�td|��YnXt|�\}}}}}|f|dd�S)	Nz()(\d+)$�]z(?:\[([^]]+)])(?::(\d+))?$z([\w\.\-]+)(?::(\d+))?$z %r is not a valid IP:port formatz0.0.0.0r�)�str�isdigitrrr
rr$rr r!r"r#)	rr%r&ZipZportr)r*rr'rrr�parse_ipport;s$r/cCs|rtjd|j��SgS)Nz[\s,]+)r�splitr
)Zlstrrr�
parse_listUsr1cs(eZdZd�fdd�	Zddd�Z�ZS)�ConcatNcs*|dk	rtd��tt|�j||f|�dS)Nznargs not supported)�
ValueError�superr2�__init__)�selfZoption_strings�dest�nargs�kwargs)�	__class__rrr5ZszConcat.__init__cCs(t||jd�pg}t||j||�dS)N)�getattrr7�setattr)r6�parser�	namespace�valuesZ
option_stringZ
curr_valuerrr�__call___szConcat.__call__)N)N)�__name__�
__module__�__qualname__r5r@�
__classcell__rr)r:rr2Ysr2�sshuttlezA%(prog)s [-l [ip:]port] [-r [user@]sshserver[:port]] <subnets...>�@)�progZusageZfromfile_prefix_charsrzIP/MASK[:PORT[-PORT]]...�*zM
    capture and forward traffic to these subnets (whitespace separated)
    )�metavarr8�type�helpz-lz--listenz	[IP:]PORTz7
    transproxy to this ip address and port number
    )rIrKz-Hz--auto-hosts�
store_truezb
    continuously scan for remote hostnames and update local /etc/hosts as
    they are found
    )�actionrKz-Nz--auto-netsz2
    automatically determine subnets to route
    z--dnszI
    capture local DNS requests and forward to the remote DNS server
    z
--ns-hostszIP[,IP]zH
    capture and forward DNS requests made to the following servers
    )rI�defaultrJrKz--to-nsz	IP[:PORT]zy
    the DNS server to forward requests to; defaults to servers in
    /etc/resolv.conf on remote side if not given.
    )rIrJrKz--method�autoZnatZnftZtproxyZpfZipfwZTYPEz
    %(choices)s
    )�choicesrIrNrKz--python�PATHz9
    path to python interpreter on the remote server
    z-rz--remotez![USERNAME[:PASSWORD]@]ADDR[:PORT]zU
    ssh hostname (and optional username and password) of remote %(prog)s server
    z-xz	--excludezIP/MASK[:PORT[-PORT]]rz:
    exclude this subnet (can be used more than once)
    )rIrMrNrJrKz-Xz--exclude-from�excludez>
    exclude the subnets in a file (whitespace separated)
    )rIrMr7rJrKz-vz	--verboserz*
    increase debug message verbosity
    )rMrNrKz-Vz	--version�versionz4
    print the %(prog)s version number and exit
    )rMrSrKz-ez	--ssh-cmdZCMDZsshzC
    the command to use to connect to the remote [%(default)s]
    )rIrNrKz--seed-hostszHOSTNAME[,HOSTNAME]zk
    comma-separated list of hostnames for initial scan (may be used with
    or without --auto-hosts)
    z--no-latency-controlZstore_falseZlatency_controlz;
    sacrifice latency to improve bandwidth benchmarks
    )rMr7rKz--latency-buffer-sizeZSIZEi�Zlatency_buffer_sizez(
    size of latency control buffer
    )rIrJrNr7rKz--wrapZNUMzJ
    restart counting channel numbers after this number (for testing)
    z--disable-ipv6z
    disable IPv6 support
    z-Dz--daemonz+
    run in the background as a daemon
    z-sz	--subnetsZsubnets_filezK
    file where the subnets are stored, instead of on the command line
    )rIrMr7rNrJrKz--syslogzC
    send log messages to syslog (default if you use --daemon)
    z	--pidfilez./sshuttle.pidz=
    pidfile name (only if using --daemon) [%(default)s]
    z--userz5
    apply all the rules only to this linux user
    )rKz
--firewallz
    (internal use only)
    z--hostwatchz	--sudoersz3
    Add sshuttle to the sudoers for this user
    z--sudoers-no-modifyzK
    Prints the sudoers config to STDOUT and DOES NOT modify anything.
    z--sudoers-user�z�
    Set the user name or group with %%group_name for passwordless operation.
    Default is the current user.set ALL for all users. Only works with
    --sudoers or --sudoers-no-modify option.
    )rNrKz--sudoers-filenameZ
sshuttle_autoz�
    Set the file name for the sudoers.d file to be added. Default is
    "sshuttle_auto". Only works with --sudoers or --sudoers-no-modify option.
    z--no-sudo-pythonpathZsudo_pythonpathz2
    do not set PYTHONPATH when invoking sudo
    )rr�argparserrrr
rErrrr/r1r2r=�add_argumentr$rrrr�<module>sN