/usr/lib/rads/venv/lib/python3.13/site-packages/netaddr/ip/__pycache__
NameSizeModeActions
glob.cpython-313.pyc116770644editdlrm
iana.cpython-313.pyc176270644editdlrm
nmap.cpython-313.pyc43420644editdlrm
rfc1924.cpython-313.pyc23540644editdlrm
sets.cpython-313.pyc259370644editdlrm
__init__.cpython-313.pyc831370644editdlrm
Edit: /usr/lib/rads/venv/lib/python3.13/site-packages/netaddr/ip/__pycache__/glob.cpython-313.pyc (11677B)
j(jSrSSKJrJr SSKJrJrJrJr Sr Sr Sr Sr Sr S r"S S \5rg ) zb Routines and classes for supporting and expressing IP address ranges using a glob style syntax. )AddrFormatErrorAddrConversionError)IPRange IPAddress IPNetworkiprange_to_cidrsc.[U[5(dgSnSnURS5n[U5S:wagUHnSU;aqU(a gSnU(a gURS5Vs/sHn[ U5PM snupgXg:a gSUs=::aS::d g gSUs=::aS ::d g gMzUS :XaSnMUSLa gUSLa gS[ U5s=::aS ::dO gM gs snf![ a  gf=f![ a  gf=f) z :param ipglob: An IP address range in a glob-style format. :return: ``True`` if IP range glob is valid, ``False`` otherwise. F.-Tr*) isinstancestrsplitlenint ValueError)ipglob seen_hyphen seen_asteriskoctetsoctetioctet1octet2s B/usr/lib/rads/venv/lib/python3.13/site-packages/netaddr/ip/glob.py valid_globr s8 fc " "KM \\# F 6{a %<K 49KK4D#E4DqCF4D#E %#%&%#%&& c\ Md"$ CJ-#- .5< +$F  $  s6C5/C0C5D0C55 DD DDc[U5(d[SU<S35e/n/nURS5HnSU;a;URS5nURUS5 URUS5 MDUS:Xa$URS5 URS 5 MnURU5 URU5 M [ SR U55[ SR U554$) z A function that accepts a glob-style IP range and returns the component lower and upper bound IP address. :param ipglob: an IP address range in a glob-style format. :return: a tuple contain lower and upper bound IP objects. not a recognised IP glob range: !r r rrr0255)r rrappendrjoinr start_tokens end_tokensrtokenss rglob_to_iptupler,Es f  vOPPLJc" %<[[%F   q *   fQi ( c\    $   e $    &   e $# SXXl+ ,i8L.M MMc[U5(d[SU<S35e/n/nURS5HnSU;a;URS5nURUS5 URUS5 MDUS:Xa$URS5 URS 5 MnURU5 URU5 M [ SR U5SR U55$) z A function that accepts a glob-style IP range and returns the equivalent IP range. :param ipglob: an IP address range in a glob-style format. :return: an IPRange object. r"r#r r rrrr$r%)r rrr&rr'r(s rglob_to_ipranger/cs f  vOPPLJc" %<[[%F   q *   fQi ( c\    $   e $    &   e $# 388L)388J+? @@r-c[U5n[U5nURS:waURS:wa [S5eSn/nU"X5n[U5(d [S5eUR U5 U$![a6 [ X5H#nU"USUS5nUR U5 M% U$f=f)a A function that accepts an arbitrary start and end IP address or subnet and returns one or more glob-style IP ranges. :param start: the start IP address or subnet. :param end: the end IP address or subnet. :return: a list containing one or more IP globs. r z!IP glob ranges only support IPv4!cR[U5RS5Vs/sHn[U5PM nn[U5RS5Vs/sHn[U5PM nn/nSnSn[S5HnX8XH:XaUR [X855 M+X8S:XaXHS:XaUR S5 SnMPU(d2U(d UR X8<SXH<35 SnM~[ S 5e[ S 5e SR U5$s snfs snf) Nr Fr rrrTr z,only 1 hyphenated octet per IP glob allowed!z3asterisks are not allowed before hyphenated octets!)rrrranger&rr') lbub_t1t2r+rrrs r_iprange_to_glob*iprange_to_globs.._iprange_to_globs!"gmmC0 10c!f0 1!"gmmC0 10c!f0 1  qAu~ c"%j)%1*25C< c" $ %& &>?&* 12`aa-.cdd#&xx72 1s DD$zinvalid ip glob createdr)rversionrr r&r)startendr8globsrcidrs riprange_to_globsr@s e E C.C }}ckkQ.!"EFF > E!!%-&!!&&?@ @ V L ! %U0D%d1gtBx8F LL 1 L!s4A>>=B>c$[[U56$)z A function that accepts a glob-style IP range and returns a list of one or more IP CIDRs that exactly matches it. :param ipglob: an IP address range in a glob-style format. :return: a list of one or more IP objects. )rr,)rs r glob_to_cidrsrBs _V4 55r-cz[U5n[USUS5n[U5S:wa [S5eUS$)z A function that accepts an IP subnet in a glob-style format and returns a list of CIDR subnets that exactly matches the specified glob. :param cidr: an IP object CIDR subnet. :return: a list of one or more IP addresses and subnets. rr:rzbad CIDR to IP glob conversion!)rr@rr)r?ipr>s r cidr_to_globrEsC 4B RUBrF +E 5zQ""CDD 8Or-cv^\rSrSrSrSrU4SjrU4SjrU4SjrSr Sr \ "\ \ S S 5r S r S rS rU=r$)IPGlobaJ Represents an IP address range using a glob-style syntax ``x.x.x-y.*`` Individual octets can be represented using the following shortcuts : 1. ``*`` - the asterisk octet (represents values ``0`` through ``255``) 2. ``x-y`` - the hyphenated octet (represents values ``x`` through ``y``) A few basic rules also apply : 1. ``x`` must always be less than ``y``, therefore : - ``x`` can only be ``0`` through ``254`` - ``y`` can only be ``1`` through ``255`` 2. only one hyphenated octet per IP glob is allowed 3. only asterisks are permitted after a hyphenated octet Examples: +------------------+------------------------------+ | IP glob | Description | +==================+==============================+ | ``192.0.2.1`` | a single address | +------------------+------------------------------+ | ``192.0.2.0-31`` | 32 addresses | +------------------+------------------------------+ | ``192.0.2.*`` | 256 addresses | +------------------+------------------------------+ | ``192.0.2-3.*`` | 512 addresses | +------------------+------------------------------+ | ``192.0-1.*.*`` | 131,072 addresses | +------------------+------------------------------+ | ``*.*.*.*`` | the whole IPv4 address space | +------------------+------------------------------+ .. note :: IP glob ranges are not directly equivalent to CIDR blocks. They can represent address ranges that do not fall on strict bit mask boundaries. They are suitable for use in configuration files, being more obvious and readable than their CIDR counterparts, especially for admins and end users with little or no networking knowledge or experience. All CIDR addresses can always be represented as IP globs but the reverse is not always true. _globc>[U5up#[[U]X#5 [ UR UR 5SUlgNr)r,superrG__init__r@_start_endglob)selfrr<r= __class__s rrNIPGlob.__init__s9&v.  fd$U0$T[[$))[[U] 5$)z-:return: Pickled state of an `IPGlob` object.)rMrG __getstate__)rRrSs rrVIPGlob.__getstate__sVT/11r-c|>[[U] U5 [URUR 5SUlg)z>:param state: data used to unpickle a pickled `IPGlob` object.rN)rMrG __setstate__r@rOrPrQ)rRstaterSs rrYIPGlob.__setstate__!s- fd(/$T[[$))rusH  >FF3lN<A