feat(task): add nslookup DNS lookup task
Adds nslookup as a new ReconDns task for DNS record enumeration.
Implementation
-
New task:
secator/tasks/nslookup.py- Line-by-line parser for nslookup output
- Supports A, AAAA, MX, NS, TXT, CNAME record types
- Outputs
RecordandIptypes for IPv4/IPv6 addresses - Options:
--type(record type filter),--server(custom DNS server)
-
Test fixture:
tests/fixtures/nslookup_output.txt- Sample output with A and AAAA records
-
Integration tests:
- Added input configuration in
tests/integration/inputs.py - Added expected output configuration in
tests/integration/outputs.py
- Added input configuration in
Usage
# Basic lookup
secator task nslookup example.com
# Query MX records via custom server
secator task nslookup -type MX -server 8.8.8.8 example.com
Parser Details
Distinguishes DNS server metadata (Address: 8.8.8.8#53) from result IPs (Address: 93.184.216.34) by checking for port notation. Maintains state across Name: and Address: line pairs to correlate hostnames with IPs.
[!WARNING]
Original prompt
This section details on the original issue you should resolve
<filter_complete></filter_complete>
Comments on the Issue (you are @copilot in this section)
- Fixes freelabz/secator#765
Original prompt
This section details on the original issue you should resolve
<issue_title>feat(task): add support for nslookup</issue_title> <issue_description></issue_description>
Comments on the Issue (you are @copilot in this section)
- Fixes freelabz/secator#765
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
[!IMPORTANT]
Review skipped
Bot user detected.
To trigger a single review, invoke the
@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
Comment @coderabbitai help to get the list of available commands and usage tips.
@copilot You were rate-limited. Finish your work from where you left off
@copilot You were rate-limited. Finish your work from where you left off
Done. Added integration test configuration in commit f58965f:
tests/integration/inputs.py: Added 'nslookup': 'wikipedia.org'tests/integration/outputs.py: Added expected Ip and Record outputs for nslookup task