Exemple #1
0
        'netflow', 'ntp', 'ppp', 'pptp', 'radius', 'rip', 'rtp', 'sctp',
        'sixlowpan', 'skinny', 'smb', 'snmp', 'tftp', 'vrrp', 'vxlan', 'x509',
        'zigbee'
    ]
    contribs = dict()
    crypto_valid = isCryptographyValid()
    crypto_valid_recent = isCryptographyRecent()
    crypto_valid_advanced = crypto_valid_recent and isCryptographyAdvanced()
    fancy_prompt = True
    auto_crop_tables = True
    recv_poll_rate = 0.05


if not Conf.ipv6_enabled:
    log_scapy.warning(
        "IPv6 support disabled in Python. Cannot load Scapy IPv6 layers."
    )  # noqa: E501
    for m in ["inet6", "dhcp6"]:
        if m in Conf.load_layers:
            Conf.load_layers.remove(m)

conf = Conf()
conf.logLevel = 30  # 30=Warning


def crypto_validator(func):
    """
    This a decorator to be used for any method relying on the cryptography library.  # noqa: E501
    Its behaviour depends on the 'crypto_valid' attribute of the global 'conf'.
    """
    def func_in(*args, **kwargs):
Exemple #2
0
    ipv6_enabled = socket.has_ipv6
    ethertypes = ETHER_TYPES
    protocols = IP_PROTOS
    services_tcp = TCP_SERVICES
    services_udp = UDP_SERVICES
    extensions_paths = "."
    manufdb = MANUFDB
    stats_classic_protocols = []
    stats_dot11_protocols = []
    temp_files = []
    netcache = NetCache()
    geoip_city = '/usr/share/GeoIP/GeoLiteCity.dat'
    load_layers = [
        "l2", "inet", "dhcp", "dns", "dot11", "gprs", "tls", "hsrp", "inet6",
        "ir", "isakmp", "l2tp", "mgcp", "mobileip", "netbios", "netflow",
        "ntp", "ppp", "radius", "rip", "rtp", "skinny", "smb", "snmp", "tftp",
        "x509", "bluetooth", "dhcp6", "llmnr", "sctp", "vrrp", "ipsec", "lltd",
        "vxlan"
    ]


if not Conf.ipv6_enabled:
    log_scapy.warning(
        "IPv6 support disabled in Python. Cannot load scapy IPv6 layers.")
    for m in ["inet6", "dhcp6"]:
        if m in Conf.load_layers:
            Conf.load_layers.remove(m)

conf = Conf()
conf.logLevel = 30  # 30=Warning
Exemple #3
0
    netcache = NetCache()
    geoip_city = '/usr/share/GeoIP/GeoIPCity.dat'
    geoip_city_ipv6 = '/usr/share/GeoIP/GeoIPCityv6.dat'
    load_layers = ["l2", "inet", "dhcp", "dns", "dot11", "gprs", "tls",
                   "hsrp", "inet6", "ir", "isakmp", "l2tp", "mgcp",
                   "mobileip", "netbios", "netflow", "ntp", "ppp", "pptp",
                   "radius", "rip", "rtp", "skinny", "smb", "snmp",
                   "tftp", "x509", "bluetooth", "dhcp6", "llmnr",
                   "sctp", "vrrp", "ipsec", "lltd", "vxlan", "eap"]
    contribs = dict()
    crypto_valid = isCryptographyValid()
    crypto_valid_advanced = isCryptographyAdvanced()


if not Conf.ipv6_enabled:
    log_scapy.warning("IPv6 support disabled in Python. Cannot load Scapy IPv6 layers.")
    for m in ["inet6","dhcp6"]:
        if m in Conf.load_layers:
            Conf.load_layers.remove(m)
    
if not Conf.crypto_valid:
    log_scapy.warning("Crypto-related methods disabled for IPsec, Dot11 "
                      "and TLS layers (needs python-cryptography v1.7+).")

conf=Conf()
conf.logLevel=30 # 30=Warning


def crypto_validator(func):
    """
    This a decorator to be used for any method relying on the cryptography library.
Exemple #4
0
    ethertypes = ETHER_TYPES
    protocols = IP_PROTOS
    services_tcp = TCP_SERVICES
    services_udp = UDP_SERVICES
    extensions_paths = "."
    manufdb = MANUFDB
    stats_classic_protocols = []
    stats_dot11_protocols = []
    temp_files = []
    netcache = NetCache()
    geoip_city = '/usr/share/GeoIP/GeoLiteCity.dat'
    load_layers = ["l2", "inet", "dhcp", "dns", "dot11", "gprs", "tls",
                   "hsrp", "inet6", "ir", "isakmp", "l2tp", "mgcp",
                   "mobileip", "netbios", "netflow", "ntp", "ppp",
                   "radius", "rip", "rtp", "skinny", "smb", "snmp",
                   "tftp", "x509", "bluetooth", "dhcp6", "llmnr",
                   "sctp", "vrrp", "ipsec", "lltd", "vxlan"]
    contribs = dict()


if not Conf.ipv6_enabled:
    log_scapy.warning("IPv6 support disabled in Python. Cannot load Scapy IPv6 layers.")
    for m in ["inet6","dhcp6"]:
        if m in Conf.load_layers:
            Conf.load_layers.remove(m)
    

conf=Conf()
conf.logLevel=30 # 30=Warning