zmap / zdns

Fast DNS Lookup Library and CLI Tool
Apache License 2.0
939 stars 123 forks source link

Convert name to lowercase in TargetedLookup #303

Closed vishalmohanty closed 1 year ago

vishalmohanty commented 2 years ago

This diff does the following.

Testing:

» echo "cmu.edu" | ./zdns nslookup | python -m json.tool
{
    "data": {
        "servers": [
            {
                "ipv4_addresses": [
                    "38.96.147.4"
                ],
                "name": "NY-SERVER-03.NET.CMU.EDU",
                "ttl": 19804,
                "type": "NS"
            },
            {
                "ipv4_addresses": [
                    "128.237.148.168"
                ],
                "name": "NSAUTH2.NET.CMU.EDU",
                "ttl": 19804,
                "type": "NS"
            },
            {
                "ipv4_addresses": [
                    "128.2.1.8"
                ],
                "name": "NSAUTH1.NET.CMU.EDU",
                "ttl": 19804,
                "type": "NS"
            }
        ]
    },
    "name": "cmu.edu",
    "status": "NOERROR",
    "timestamp": "2022-04-28T10:29:35-07:00"
}
» echo "NY-SERVER-03.NET.cmu.edu" | ./zdns alookup | python -m json.tool
{
    "data": {
        "ipv4_addresses": [
            "38.96.147.4"
        ]
    },
    "name": "NY-SERVER-03.NET.cmu.edu",
    "status": "NOERROR",
    "timestamp": "2022-04-28T10:29:51-07:00"
}
vishalmohanty commented 2 years ago

Fix for https://github.com/zmap/zdns/issues/300