I am a beginner in hacking. I have been trying to hack Windows XP using the netapi exploit in metasploit, but every time, in the end, I get an error:
Exploit failed [unreachable]: Rex::ConnectionRefused The connection was refused
Exploit completed but no session was created.
I even tried turning off the firewall and tried to ping my XP machine with kali and it was doing it well. Can someone help me with this problem?