Open your terminal. Navigate to the Nikto installation directory. Start Nikto using the command:
perl nikto.pl
Scan a target website:
perl nikto.pl -h <target-url>
Example:
perl nikto.pl -h http://example.com
To specify a port (default is 80):
perl nikto.pl -h <target-url> -p <port>
Example:
perl nikto.pl -h http://example.com -p 8080
Enable or disable specific tests:
perl nikto.pl -h <target-url> -T <test-id>
List available tests with:
perl nikto.pl -list-plugins
Save results to a file:
perl nikto.pl -h <target-url> -o <output-file> -F <format>
Example:
perl nikto.pl -h http://example.com -o results.txt -F txt
To scan HTTPS sites:
perl nikto.pl -h https://<target-url>
Example:
perl nikto.pl -h https://example.com
Change the User-Agent string:
perl nikto.pl -h <target-url> -useragent "<custom-user-agent>"
Use nohup to run Nikto in the background:
nohup perl nikto.pl -h <target-url> &
Exclude certain tests using:
perl nikto.pl -h <target-url> -e <test-id>
To see all options and usage:
perl nikto.pl -h