Use THC hydra to make dictionary attack on localhost

5.5k Views Asked by At

I have programmed a log in in my webpage and now I want to test it against a dictionary attack. I am using Apache and my website is not online so to access it I connect to localhost/website In hydra I am using the command

hydra -l username -P passList.txt localhost/website http-post-form "/logIn.php:user=^USER^&pass=^PASS:forgot"

But it terminates with error

[DATA] attacking service http-post-form on port 80 [ERROR] could not resolve address: localhost/website 0 of 1 target completed, 0 valid passwords found [ERROR] 1 target did not resolve or could not be connected What is the problem?

2

There are 2 best solutions below

0
On

Try this:

hydra -l username -P passList.txt localhost http-post-form \
    "/website/logIn.php:user=^USER^&pass=^PASS:forgot"
0
On

use the ip address somewhere localhost for example :

hydra -l username -P passList.txt 127.0.0.1/website http-post-form "/logIn.php:user=^USER^&pass=^PASS:forgot"