PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  w{Zc@s<dZddlmZddlmZdZdZdS(s Routines for dealing with nmap-style IPv4 address ranges. The nmap range specification represents between 1 and 4 contiguous IP address blocks depending on the range specified. Each octets can be represented with hyphenated range sets according to the following rules: 1. * C{'x-y'} - the hyphenated octet (represents values x through y) 2. x must be less than or equal to y 3. x and y must be values between 0 through 255 Example nmap ranges :: '192.0.2.1' # one IP address '192.0.2.0-31' # one block with 32 IP addresses. '192.0.2-3.1-254' # two blocks with 254 IP addresses. '0-255.0-255.0-255.0-255' # the whole IPv4 address space i(tAddrFormatError(t IPAddresscCst}t|dst}ni|jd}t|dkrHt}n?x<|D]4}d|kr8|jd}t|d krt}Pnyddt|dkodknst}Pndt|dkodknst}PnWntk r t}PnXt|dt|dkrt}PqqOy0dt|koXdknsgt}PnWqOtk rt}PqOXqOW|S( sy @param iprange: an nmap-style IP address range. @return: C{True} if IP range is valid, C{False} otherwise. tsplitt.it-iiii(ii(tTruethasattrtFalseRtlentintt ValueError(tiprangetstatusttokensttokentoctets((s3/usr/lib/python2.7/site-packages/netaddr/ip/nmap.pytvalid_nmap_rangesB    &&  "  c cst|std|ng}|jd}xt|D]l}d|kr|jdd}t|dt|df}nt|t|f}|j|q;Wxt|dd|dddD]}xt|dd|dddD]}}xtt|dd|dddD]O}xFt|dd|dddD]!} td|||| fVqMWq#WqWqWd S( sH The nmap security tool supports a custom type of IPv4 range using multiple hyphenated octets. This generator provides iterators yielding IP addresses according to this rule set. @param iprange: an nmap-style IP address range. @return: an iterator producing IPAddress objects for each IP in the range. sinvalid nmap range: %sRRiiiis %d.%d.%d.%dN(RRRR tappendtrangeR( R tmatrixR RRtpairtwtxtytz((s3/usr/lib/python2.7/site-packages/netaddr/ip/nmap.pytiter_nmap_rangeKs   #****N(t__doc__t netaddr.coreRt netaddr.ipRRR(((s3/usr/lib/python2.7/site-packages/netaddr/ip/nmap.pyts ,