FormGuard is a web-based tool designed to scan websites for form verification mechanisms and detect the presence of affiliate tracking pixels. It helps identify whether forms have basic validation (such as required fields, email/phone validation, CAPTCHA) and if JavaScript-based validation appears upon interaction. Additionally, it detects tracking scripts related to affiliate networks, which can indicate a higher risk of fraudulent submissions.
- Automated website scanning: Detects forms and checks for verification mechanisms.
- JavaScript validation detection: Simulates user interaction to trigger potential validation messages.
- Affiliate pixel detection: Identifies tracking scripts from known affiliate networks.
- Slack notifications: Sends scan results to a configured Slack channel.
- Future Feature: Scheduled scanning: The ability to run daily scans at 8 AM via a cron job (coming soon).
- Console-based output: Displays scan results in the terminal.
- Install Node.js (v20+ recommended) from Node.js official site
- Install npm (included with Node.js)
- Install required dependencies:
npm install
- Change .env.example to .env and set up your Slack token and channel variables.
SLACK_TOKEN=<your-slack-token> SLACK_CHANNEL=<your-slack-channel-id>
- Open
index.jsand modify thewebsitesarray to include the URLs you want to scan:const websites = [ 'https://example.com', 'https://another-example.com', 'https://yourwebsite.com' ];
To start the scanner manually, run:
node index.jsThis will scan the listed websites and display results in the terminal.
The script is configured to send scan results to a Slack channel. To enable this feature:
- Ensure you have added your Slack token and channel ID in the
.envfile. - When a scan completes, the script will post:
- The website URL scanned.
- Whether forms were found and validated.
- If affiliate tracking pixels were detected.
The ability to run the scan daily at 8 AM using a cron job will be available in a future update.
If using PM2, check logs with:
pm2 logs formguard- Loads each website in a headless browser.
- Detects forms and checks for built-in validation.
- Simulates user input on form fields to check if JavaScript validation appears.
- Scans scripts for known affiliate tracking pixels.
- Outputs results in the console and optionally sends them to Slack.
Feel free to suggest improvements or submit pull requests to enhance functionality!
This project is licensed under the MIT License.