You can make the BitNinja captcha page more user-friendly by customizing it. For example, you can include your company logo. This way users will be more familiar with it The captcha page can be customized on a per-server basis.
The default captcha page is stored in the
However, if you place your custom captcha pages into the
/etc/bitninja/CaptchaHttp/www/ then these pages will be served to the greylisted visitors.
- Copy the contents of the
/opt/bitninja/modules/CaptchaHttp/lib/www/directory to the
You can do this from your preferred SFTP, FTP, or SCP client. Or use the command below.
cp -R /opt/bitninja/modules/CaptchaHttp/lib/www/ /etc/bitninja/CaptchaHttp/www/
- Open the
/etc/bitninja/CaptchaHttp/www/captcha_challenge_template.htmlfile and modify its contents.
You can do this with your preferred HTML editor or code editor after downloading the files to your computer via SFTP, FTP, or, SCP client.
Or edit the file in the terminal using nano like this:
- Save the changes and exit the file editor.
- Restart BitNinja with the
service bitninja restartcommand.
Change the text of the captcha
The text of the captcha page can be changed in the
/etc/bitninja/CaptchaHttp/www/captcha_challenge_template.html file by editing the SUBTITLE: section at the corresponding languages.
Change the logo on the Captcha page
The BitNinja logo is inserted into the page as SVG. You can find the logo in the text if you search for “bn-logo”. Then replace the SVG with your own. Or replace the SVG logo with your .png logo.
You can press Ctrl + W to find the corresponding div in nano. Search for “bn-logo”.
Delete the <svg> and </svg> tags and the lines between them in the div.
In nano, you can delete complete lines by pressing Ctrl + K.
Add your logo in this format:
<img src="https://link.to/my/company/logo.png" alt="logo">
After the logo and the text is changed you will need to restart the BitNinja agent so the changes will take effect.
service bitninja restart command to restart the BitNinja agent.