known_hosts_bruteforcer icon indicating copy to clipboard operation
known_hosts_bruteforcer copied to clipboard

Line number off-by-one bug

Open jawaad-ahmad opened this issue 4 years ago • 0 comments

Ran on my ~/.ssh/known_hosts file as follows:

$ ./known_hosts_bruteforcer.pl -i -s 192.168.0.0

Received the following output on the first few lines:

*** Found host: 192.168.0.9 (line 7) ***
*** Found host: 192.168.0.10 (line 20) ***
...

Opened known_hosts and deleted Line 7 of the file and re-ran:

*** Found host: 192.168.0.9 (line 6) ***
*** Found host: 192.168.0.10 (line 19) ***

Expected the 192.168.0.9 line to disappear.

Reverted the change and deleted instead Line 8 of the file and re-ran. This produced the expected output:

*** Found host: 192.168.0.10 (line 19) ***

jawaad-ahmad avatar Aug 02 '20 08:08 jawaad-ahmad