darkoperator / dnsrecon

DNS Enumeration Script
GNU General Public License v2.0
2.54k stars 530 forks source link

Bug: "List index out of range" error when using verbose tag on brute reverse against IP range/CIDR #290

Open skyhacker1 opened 1 week ago

skyhacker1 commented 1 week ago

Feature Request or Bug or Other Bug

Describe the feature request or bug or other When using the -v verbose parameter with brute reverse, a "List index out of range" error occurs. Without the -v parameter the code executes without error. The problem is with line 441 in cli.py when attempting to set the ipaddress variable: ipaddress = str(ip_list[x])

To Reproduce python3 ./dnsrecon.py -v -r [CIDR/IP range]

Expected behaviour The -v verbose tag should result in displaying each IP address attempted in reverse DNS PTR query.

Screenshots When adding the -v (verbose) tag results in "List index out of range" error image

System Information (System that tool is running on):

Additional context Code issue in brute_reverse function in cli.py: image

Proposed fix (or what I did to get it to work, without any regression testing): image

L1ghtn1ng commented 1 week ago

Submit your fix in a MR and I can take a look ☺️