__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
import platform

import pytest

from netaddr import iprange_to_cidrs, IPNetwork
from netaddr.strategy.ipv6 import int_to_str


@pytest.mark.skipif('sys.platform != "darwin"')
def test_ip_behaviour_osx():
    assert iprange_to_cidrs('::1', '::255.255.255.254') == [
        IPNetwork('::1/128'),
        IPNetwork('::0.0.0.2/127'),
        IPNetwork('::0.0.0.4/126'),
        IPNetwork('::0.0.0.8/125'),
        IPNetwork('::0.0.0.16/124'),
        IPNetwork('::0.0.0.32/123'),
        IPNetwork('::0.0.0.64/122'),
        IPNetwork('::0.0.0.128/121'),
        IPNetwork('::0.0.1.0/120'),
        IPNetwork('::0.0.2.0/119'),
        IPNetwork('::0.0.4.0/118'),
        IPNetwork('::0.0.8.0/117'),
        IPNetwork('::0.0.16.0/116'),
        IPNetwork('::0.0.32.0/115'),
        IPNetwork('::0.0.64.0/114'),
        IPNetwork('::0.0.128.0/113'),
        IPNetwork('::0.1.0.0/112'),
        IPNetwork('::0.2.0.0/111'),
        IPNetwork('::0.4.0.0/110'),
        IPNetwork('::0.8.0.0/109'),
        IPNetwork('::0.16.0.0/108'),
        IPNetwork('::0.32.0.0/107'),
        IPNetwork('::0.64.0.0/106'),
        IPNetwork('::0.128.0.0/105'),
        IPNetwork('::1.0.0.0/104'),
        IPNetwork('::2.0.0.0/103'),
        IPNetwork('::4.0.0.0/102'),
        IPNetwork('::8.0.0.0/101'),
        IPNetwork('::16.0.0.0/100'),
        IPNetwork('::32.0.0.0/99'),
        IPNetwork('::64.0.0.0/98'),
        IPNetwork('::128.0.0.0/98'),
        IPNetwork('::192.0.0.0/99'),
        IPNetwork('::224.0.0.0/100'),
        IPNetwork('::240.0.0.0/101'),
        IPNetwork('::248.0.0.0/102'),
        IPNetwork('::252.0.0.0/103'),
        IPNetwork('::254.0.0.0/104'),
        IPNetwork('::255.0.0.0/105'),
        IPNetwork('::255.128.0.0/106'),
        IPNetwork('::255.192.0.0/107'),
        IPNetwork('::255.224.0.0/108'),
        IPNetwork('::255.240.0.0/109'),
        IPNetwork('::255.248.0.0/110'),
        IPNetwork('::255.252.0.0/111'),
        IPNetwork('::255.254.0.0/112'),
        IPNetwork('::255.255.0.0/113'),
        IPNetwork('::255.255.128.0/114'),
        IPNetwork('::255.255.192.0/115'),
        IPNetwork('::255.255.224.0/116'),
        IPNetwork('::255.255.240.0/117'),
        IPNetwork('::255.255.248.0/118'),
        IPNetwork('::255.255.252.0/119'),
        IPNetwork('::255.255.254.0/120'),
        IPNetwork('::255.255.255.0/121'),
        IPNetwork('::255.255.255.128/122'),
        IPNetwork('::255.255.255.192/123'),
        IPNetwork('::255.255.255.224/124'),
        IPNetwork('::255.255.255.240/125'),
        IPNetwork('::255.255.255.248/126'),
        IPNetwork('::255.255.255.252/127'),
        IPNetwork('::255.255.255.254/128'),
    ]

    # At least Apple changed inet_ntop in Mac OS 10.15 (Catalina) so it's compatible with Linux
    if platform.mac_ver()[0] >= '10.15':
        assert int_to_str(0xFFFF) == '::ffff'
    else:
        assert int_to_str(0xFFFF) == '::0.0.255.255'


@pytest.mark.skipif('sys.platform == "darwin"')
def test_ip_behaviour_non_osx():
    assert iprange_to_cidrs('::1', '::255.255.255.254') == [
        IPNetwork('::1/128'),
        IPNetwork('::2/127'),
        IPNetwork('::4/126'),
        IPNetwork('::8/125'),
        IPNetwork('::10/124'),
        IPNetwork('::20/123'),
        IPNetwork('::40/122'),
        IPNetwork('::80/121'),
        IPNetwork('::100/120'),
        IPNetwork('::200/119'),
        IPNetwork('::400/118'),
        IPNetwork('::800/117'),
        IPNetwork('::1000/116'),
        IPNetwork('::2000/115'),
        IPNetwork('::4000/114'),
        IPNetwork('::8000/113'),
        IPNetwork('::0.1.0.0/112'),
        IPNetwork('::0.2.0.0/111'),
        IPNetwork('::0.4.0.0/110'),
        IPNetwork('::0.8.0.0/109'),
        IPNetwork('::0.16.0.0/108'),
        IPNetwork('::0.32.0.0/107'),
        IPNetwork('::0.64.0.0/106'),
        IPNetwork('::0.128.0.0/105'),
        IPNetwork('::1.0.0.0/104'),
        IPNetwork('::2.0.0.0/103'),
        IPNetwork('::4.0.0.0/102'),
        IPNetwork('::8.0.0.0/101'),
        IPNetwork('::16.0.0.0/100'),
        IPNetwork('::32.0.0.0/99'),
        IPNetwork('::64.0.0.0/98'),
        IPNetwork('::128.0.0.0/98'),
        IPNetwork('::192.0.0.0/99'),
        IPNetwork('::224.0.0.0/100'),
        IPNetwork('::240.0.0.0/101'),
        IPNetwork('::248.0.0.0/102'),
        IPNetwork('::252.0.0.0/103'),
        IPNetwork('::254.0.0.0/104'),
        IPNetwork('::255.0.0.0/105'),
        IPNetwork('::255.128.0.0/106'),
        IPNetwork('::255.192.0.0/107'),
        IPNetwork('::255.224.0.0/108'),
        IPNetwork('::255.240.0.0/109'),
        IPNetwork('::255.248.0.0/110'),
        IPNetwork('::255.252.0.0/111'),
        IPNetwork('::255.254.0.0/112'),
        IPNetwork('::255.255.0.0/113'),
        IPNetwork('::255.255.128.0/114'),
        IPNetwork('::255.255.192.0/115'),
        IPNetwork('::255.255.224.0/116'),
        IPNetwork('::255.255.240.0/117'),
        IPNetwork('::255.255.248.0/118'),
        IPNetwork('::255.255.252.0/119'),
        IPNetwork('::255.255.254.0/120'),
        IPNetwork('::255.255.255.0/121'),
        IPNetwork('::255.255.255.128/122'),
        IPNetwork('::255.255.255.192/123'),
        IPNetwork('::255.255.255.224/124'),
        IPNetwork('::255.255.255.240/125'),
        IPNetwork('::255.255.255.248/126'),
        IPNetwork('::255.255.255.252/127'),
        IPNetwork('::255.255.255.254/128'),
    ]

    assert int_to_str(0xFFFF) == '::ffff'

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
__init__.py File 0 B 0644
test_cidr_v4.py File 7.4 KB 0644
test_cidr_v6.py File 4.56 KB 0644
test_dns.py File 320 B 0644
test_ip.py File 625 B 0644
test_ip_categories.py File 4.04 KB 0644
test_ip_comparisons.py File 1.39 KB 0644
test_ip_globs.py File 2.09 KB 0644
test_ip_network_categories.py File 547 B 0644
test_ip_ranges.py File 8.57 KB 0644
test_ip_rfc1924.py File 512 B 0644
test_ip_sets.py File 22.68 KB 0644
test_ip_splitter.py File 2.21 KB 0644
test_ip_v4.py File 15.07 KB 0644
test_ip_v4_v6_conversions.py File 1.22 KB 0644
test_ip_v6.py File 5.95 KB 0644
test_network_ops.py File 2.37 KB 0644
test_nmap.py File 3.62 KB 0644
test_old_specs.py File 6.37 KB 0644
test_platform_osx.py File 5.29 KB 0644
test_socket_module_fallback.py File 1.48 KB 0644
Filemanager