This file is indexed.

/usr/lib/python3/dist-packages/IPy-0.83.egg-info is in python3-ipy 1:0.83-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
Metadata-Version: 1.1
Name: IPy
Version: 0.83
Summary: Class and tools for handling of IPv4 and IPv6 addresses and networks
Home-page: https://github.com/autocracy/python-ipy
Author: Jeff Ferland
Author-email: jeff AT storyinmemo.com
License: BSD License
Download-URL: https://github.com/autocracy/python-ipy
Description: IPy - class and tools for handling of IPv4 and IPv6 addresses and networks.
        
        Website: https://github.com/autocracy/python-ipy/
        
        Presentation of the API
        =======================
        
        The IP class allows a comfortable parsing and handling for most
        notations in use for IPv4 and IPv6 addresses and networks. It was
        greatly inspired by RIPE's Perl module NET::IP's interface but
        doesn't share the implementation. It doesn't share non-CIDR netmasks,
        so funky stuff like a netmask of 0xffffff0f can't be done here.
        
            >>> from IPy import IP
            >>> ip = IP('127.0.0.0/30')
            >>> for x in ip:
            ...  print(x)
            ...
            127.0.0.0
            127.0.0.1
            127.0.0.2
            127.0.0.3
            >>> ip2 = IP('0x7f000000/30')
            >>> ip == ip2
            1
            >>> ip.reverseNames()
            ['0.0.0.127.in-addr.arpa.', '1.0.0.127.in-addr.arpa.', '2.0.0.127.in-addr.arpa.', '3.0.0.127.in-addr.arpa.']
            >>> ip.reverseName()
            '0-3.0.0.127.in-addr.arpa.'
            >>> ip.iptype()
            'PRIVATE'
        
        
        Supports most IP address formats
        ================================
        
        It can detect about a dozen different ways of expressing IP addresses
        and networks, parse them and distinguish between IPv4 and IPv6 addresses:
        
            >>> IP('10.0.0.0/8').version()
            4
            >>> IP('::1').version()
            6
        
        IPv4 addresses
        --------------
        
            >>> print(IP(0x7f000001))
            127.0.0.1
            >>> print(IP('0x7f000001'))
            127.0.0.1
            >>> print(IP('127.0.0.1'))
            127.0.0.1
            >>> print(IP('10'))
            10.0.0.0
        
        IPv6 addresses
        --------------
        
            >>> print(IP('1080:0:0:0:8:800:200C:417A'))
            1080::8:800:200c:417a
            >>> print(IP('1080::8:800:200C:417A'))
            1080::8:800:200c:417a
            >>> print(IP('::1'))
            ::1
            >>> print(IP('::13.1.68.3'))
            ::d01:4403
        
        Network mask and prefixes
        -------------------------
        
            >>> print(IP('127.0.0.0/8'))
            127.0.0.0/8
            >>> print(IP('127.0.0.0/255.0.0.0'))
            127.0.0.0/8
            >>> print(IP('127.0.0.0-127.255.255.255'))
            127.0.0.0/8
        
        
        Derive network address
        ===========================
        
        IPy can transform an IP address into a network address by applying the given
        netmask:
        >>> print(IP('127.0.0.1/255.0.0.0', make_net=True))
        127.0.0.0/8
        
        This can also be done for existing IP instances:
        >>> print(IP('127.0.0.1').make_net('255.0.0.0'))
        127.0.0.0/8
        
        
        Convert address to string
        =========================
        
        Nearly all class methods which return a string have an optional
        parameter 'wantprefixlen' which controls if the prefixlen or netmask
        is printed. Per default the prefilen is always shown if the network
        contains more than one address::
        
            wantprefixlen == 0 / None     don't return anything   1.2.3.0
            wantprefixlen == 1            /prefix                 1.2.3.0/24
            wantprefixlen == 2            /netmask                1.2.3.0/255.255.255.0
            wantprefixlen == 3            -lastip                 1.2.3.0-1.2.3.255
        
        You can also change the defaults on an per-object basis by fiddling with
        the class members:
        
         * NoPrefixForSingleIp
         * WantPrefixLen
        
        Examples of string conversions:
        
            >>> IP('10.0.0.0/32').strNormal()
            '10.0.0.0'
            >>> IP('10.0.0.0/24').strNormal()
            '10.0.0.0/24'
            >>> IP('10.0.0.0/24').strNormal(0)
            '10.0.0.0'
            >>> IP('10.0.0.0/24').strNormal(1)
            '10.0.0.0/24'
            >>> IP('10.0.0.0/24').strNormal(2)
            '10.0.0.0/255.255.255.0'
            >>> IP('10.0.0.0/24').strNormal(3)
            '10.0.0.0-10.0.0.255'
            >>> ip = IP('10.0.0.0')
            >>> print(ip)
            10.0.0.0
            >>> ip.NoPrefixForSingleIp = None
            >>> print(ip)
            10.0.0.0/32
            >>> ip.WantPrefixLen = 3
            >>> print(ip)
            10.0.0.0-10.0.0.0
        
        Work with multiple networks
        ===========================
        
        Simple addition of neighboring netblocks that can be aggregated will yield
        a parent network of both, but more complex range mapping and aggregation
        requires is available with the IPSet class which will hold any number of
        unique address ranges and will aggregate overlapping ranges.
        
            >>> from IPy import IP, IPSet
            >>> IP('10.0.0.0/22') - IP('10.0.2.0/24')
            IPSet([IP('10.0.0.0/23'), IP('10.0.3.0/24')])
            >>> IPSet([IP('10.0.0.0/23'), IP('10.0.3.0/24'), IP('10.0.2.0/24')])
            IPSet([IP('10.0.0.0/22')])
            >>> s = IPSet([IP('10.0.0.0/22')])
            >>> s.add(IP('192.168.1.0/29'))
            >>> s
            IPSet([IP('10.0.0.0/22'), IP('192.168.1.0/29')])
            >>> s.discard(IP('192.168.1.2'))
            >>> s
            IPSet([IP('10.0.0.0/22'), IP('192.168.1.0/31'), IP('192.168.1.3'), IP('192.168.1.4/30')])
        
        IPSet supports the `set` method `isdisjoint`:
        
            >>> s.isdisjoint(IPSet([IP('192.168.0.0/16')]))
            False
            >>> s.isdisjoint(IPSet([IP('172.16.0.0/12')]))
            True
        
        IPSet supports intersection:
        
            >>> s & IPSet([IP('10.0.0.0/8')])
            IPSet([IP('10.0.0.0/22')])
        
        Compatibility and links
        =======================
        
        IPy 0.83 works on Python version 2.6 - 3.4.
        
        The IP module should work in Python 2.5 as long as the subtraction operation
        is not used. IPSet requires features of the collecitons class which appear
        in Python 2.6, though they can be backported.
        
        Eratta
        ======
        
        When using IPv6 addresses, it is best to compare using IP().len() instead of
        len(IP). Addresses with an integer value > 64 bits can break the 2nd method.
        See http://stackoverflow.com/questions/15650878 for more info.
        
        Fuzz testing for IPSet will throw spurious errors when the IPSet module
        combines two smaller prefixes into a larger prefix that matches the random
        prefix tested against.
        
        This Python module is under BSD license: see COPYING file.
        
        Further Information might be available at:
        https://github.com/autocracy/python-ipy
        
        What's new
        ==========
        
        Version 0.83 (2015-04-04)
        ------------
         * Add carrier grade NAT ranges
         * Unbreak lots of packing systems by not having a letter in the release version
        
        Version 0.82a (2014-10-07)
        ------------
         * Fix version numbers in files
         * Correct x.next() -> next(x) python3 compatability
        
        Version 0.82 (2014-10-06)
        ------------
        
         * Add support for array slices
         * Add __and__ and isdisjoint for IPSet
         * Fix a bug in IPSet where contains may incorrectly return false
         * Added some fuzz testing
        
        Version 0.81 (2013-04-08)
        ------------
        
         * Correct reverseName() for IPv6 addresses, so IP('::1').reverseName() returns correct.
         * Add network mask awareness to v46map()
         * Fix Python 3 errors in IPSet class
         * Make IPSet base class be object when MutableSet isn't available, fixing
           errors in Python 2.5
        
        Version 0.80 (2013-03-26)
        ------------
        
         * Drop support of Python older than 2.4
         * Python 3 does not need 2to3 conversion anymore (same code base)
         * Fix adding of non-adjacent networks:
           192.168.0.0/24 + 192.168.255.0/24 made 192.168.0.0/23
         * Fix adding networks that don't create a valid subnet:
           192.168.1.0/24 + 192.168.2.0/24 made 192.168.1.0/23
         * Fix adding with an IPv6 address where .int() was < 32 bits made IPy believe it
          was an IPv4 address:
          ::ffff:0/112 + ::1:0:0/112 made 255.255.0.0/111
         * Add support of IPSets
         * Add support for subtracting a network range
         * Prevent IPv4 and IPv6 ranges from saying they contain each other
         * Add a .v46map() method to convert mapped address ranges
           such as IP('::ffff:192.168.1.1'); RFC 4291
         * Change sort order to more natural: 
           IPv4 before IPv6; less-specific prefixes first (/0 before /32)
        
        
        Version 0.76 (2013-03-19)
        -------------------------
        
         * ip == other and ip != other doesn't fail with an exception anymore if other
          is not a IP object
         * Add IP.get_mac() method: get the 802.3 MAC address from IPv6 RFC 2464
          address.
         * Fix IP('::/0')[0]: return an IPv6 instead of an IPv4 address
        
        Version 0.75 (2011-04-12)
        -------------------------
        
         * IP('::/0').netmask() gives IP('::') instead of IP('0.0.0.0')
        
        Version 0.74 (2011-02-16)
        -------------------------
        
         * Fix tests for Python 3.1 and 3.2
         * ip.__nonzero__() and (ipa in ipb) return a bool instead of 0 or 1
         * IP('0.0.0.0/0') + IP('0.0.0.0/0') raises an error, fix written by Arfrever
        
        Version 0.73 (2011-02-15)
        -------------------------
        
         * Support Python 3: setup.py runs 2to3
         * Update the ranges for IPv6 IPs
         * Fix reverseName() and reverseNames() for IPv4 in IPv6 addresses
         * Drop support of Python < 2.5
        
        Version 0.72 (2010-11-23)
        -------------------------
        
         * Include examples and MANIFEST.in in source build (add them to
           MANIFEST.in)
         * Remove __rcsid__ constant from IPy module
        
        Version 0.71 (2010-10-01)
        -------------------------
        
         * Use xrange() instead of range()
         * Use isinstance(x, int) instead of type(x) == types.IntType
         * Prepare support of Python3 (use integer division: x // y)
         * Fix IP(long) constructor: ensure that the address is not too large
         * Constructor raise a TypeError if the type is not int, long,
           str or unicode
         * 223.0.0.0/8 is now public (belongs to APNIC)
        
        Version 0.70 (2009-10-29)
        -------------------------
        
         * New "major" version because it may break compatibility
         * Fix __cmp__(): IP('0.0.0.0/0') and IP('0.0.0.0') are not equal
         * Fix IP.net() of the network "::/0": "::" instead of "0.0.0.0".
           IPy 0.63 should fix this bug, but it wasn't.
        
        Version 0.64 (2009-08-19)
        -------------------------
        
         * Create MANIFEST.in to fix setup.py bdist_rpm, fix by Robert Nickel
        
        Version 0.63 (2009-06-23)
        -------------------------
        
         * Fix formatting of "IPv4 in IPv6" network, eg. IP('::ffff:192.168.10.0/120'),
           the netmask ("/120" in the example) was missing!
        
        Version 0.62 (2008-07-15)
        -------------------------
        
         * Fix reverse DNS of IPv6 address: use ".ip6.arpa." suffix instead of
           deprecated ".ip6.int." suffix
        
        Version 0.61 (2008-06-12)
        -------------------------
        
         * Patch from Aras Vaichas allowing the [-1] operator
           to work with an IP object of size 1.
        
        Version 0.60 (2008-05-16)
        -------------------------
        
         * strCompressed() formats '::ffff:a.b.c.d' correctly
         * Use strCompressed() instead of strFullsize() to format IP addresses,
           ouput is smarter with IPv6 address
         * Remove check_addr_prefixlen because it generates invalid IP address
Keywords: ipv4 ipv6 netmask
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Environment :: Plugins
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Communications
Classifier: Topic :: Internet
Classifier: Topic :: System :: Networking
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3