nslookup takes >2 argvs w/o errors, uses only 1st and last
"kernel.org" argument is ignored in this example:
$ nslookup redhat.com kernel.org 127.0.0.1 Server: 127.0.0.1 Address: 127.0.0.1#53 Non-authoritative answer: Name: redhat.com Address: 10.x.xx.xxx
Code where it can be handled:for (argc--, argv++; argc > 0; argc--, argv++) { debug("main parsing %s", argv[0]); if (argv[0][0] == '-') { if (strncasecmp(argv[0], "-ver", 4) == 0) { version(); exit(0); } else if (argv[0][1] != 0) { setoption(&argv[0][1]); } else have_lookup = ISC_TRUE; } else { if (!have_lookup) { have_lookup = ISC_TRUE; in_use = ISC_TRUE; addlookup(argv[0]); } else { set_nameserver(argv[0]); //PROBABLY SHOULD ERROR OUT HERE IF argv[1] is not NULL? check_ra = ISC_FALSE; } } }
Edited by Ghost User