PHPackages                             petrevsky/amasty-captcha-bypass - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. petrevsky/amasty-captcha-bypass

ActiveMagento2-module[Testing &amp; Quality](/categories/testing)

petrevsky/amasty-captcha-bypass
===============================

A Magento 2 captcha bypass module for testing purposes - Compatible with Amasty InvisibleCaptcha

00PHP

Since Oct 3Pushed 7mo agoCompare

[ Source](https://github.com/petrevsky/amasty-captcha-bypass)[ Packagist](https://packagist.org/packages/petrevsky/amasty-captcha-bypass)[ RSS](/packages/petrevsky-amasty-captcha-bypass/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Captcha Bypass for Amasty InvisibleCaptcha
==========================================

[](#captcha-bypass-for-amasty-invisiblecaptcha)

Bypass Google reCAPTCHA for defined IP addresses or User-Agent strings. Useful for automated testing with Selenium, Cypress, or other testing tools.

**Compatible with Amasty InvisibleCaptcha extension.**

Requirements
------------

[](#requirements)

- Magento 2.4+
- Amasty InvisibleCaptcha extension must be installed and enabled

Installation
------------

[](#installation)

### Via Composer (Recommended)

[](#via-composer-recommended)

```
composer require petrevsky/amasty-captcha-bypass
bin/magento module:enable Magenable_CaptchaBypass
bin/magento setup:upgrade
bin/magento cache:clean
```

### Manual Installation

[](#manual-installation)

1. Copy the module to `app/code/Magenable/CaptchaBypass`
2. Run the following commands:

```
bin/magento module:enable Magenable_CaptchaBypass
bin/magento setup:upgrade
bin/magento cache:clean
```

Upgrade
-------

[](#upgrade)

```
composer update petrevsky/amasty-captcha-bypass
bin/magento setup:upgrade
bin/magento cache:clean
```

Configuration
-------------

[](#configuration)

1. Go to **Stores** → **Configuration** → **Advanced** → **Captcha Bypass**
2. Set **Enabled** to **Yes**
3. Configure bypass rules:
    - **Whitelisted IP addresses**: Comma-separated IPs (e.g., `127.0.0.1,192.168.1.100`)
    - **Whitelisted User-Agent**: Exact User-Agent string (e.g., `Selenium WebDriver` or `Cypress/12.0`)
4. Save configuration and clear cache

If one of the conditions is met, the reCAPTCHA will be bypassed.

How It Works
------------

[](#how-it-works)

This module intercepts Amasty InvisibleCaptcha's `isNeedToShowCaptcha()` method. When enabled:

- If the visitor's IP address matches any in the whitelist, captcha will be bypassed
- If the visitor's User-Agent matches the configured value, captcha will be bypassed
- The module respects Amasty's native IP whitelist and adds additional bypass capabilities

Testing Examples
----------------

[](#testing-examples)

### Selenium WebDriver

[](#selenium-webdriver)

```
from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument("user-agent=Selenium WebDriver")
driver = webdriver.Chrome(options=options)
```

### Cypress

[](#cypress)

```
cy.visit(url, {
    headers: {
        "User-Agent": "Cypress/12.0",
    },
});
```

### cURL

[](#curl)

```
curl -X POST https://your-store.com/customer/account/loginPost \
  -H "User-Agent: TestBot/1.0" \
  -d "login[username]=test@example.com&login[password]=Test123!"
```

Compatibility
-------------

[](#compatibility)

- ✅ Amasty InvisibleCaptcha v2.5.1+
- ✅ Magento 2.4.5, 2.4.6, 2.4.7
- ✅ reCAPTCHA v2 and v3

Security Notes
--------------

[](#security-notes)

⚠️ **Important**: This module bypasses security controls.

**Recommended use cases:**

- Development environments
- Testing/QA environments
- Automated testing (CI/CD pipelines)

**NOT recommended for:**

- Production environments
- Public-facing stores

If using in production, ensure:

- Only trusted IPs/User-Agents are whitelisted
- Alternative security measures are in place
- Regular security audits are performed

Troubleshooting
---------------

[](#troubleshooting)

### Module not working?

[](#module-not-working)

1. Verify module is enabled:

    ```
    bin/magento module:status Magenable_CaptchaBypass
    ```
2. Check Amasty is installed:

    ```
    bin/magento module:status Amasty_InvisibleCaptcha
    ```
3. Clear all caches:

    ```
    bin/magento cache:flush
    ```
4. Recompile (if in production mode):

    ```
    bin/magento setup:di:compile
    ```

### Still showing captcha?

[](#still-showing-captcha)

- Verify IP format is correct (no spaces after commas)
- Check User-Agent matches exactly (case-sensitive)
- Ensure module is enabled in **Stores** → **Configuration** → **Advanced** → **Captcha Bypass**
- Check Magento logs: `var/log/system.log`

Documentation
-------------

[](#documentation)

- [Integration Guide](AMASTY_INTEGRATION.md) - Technical details and testing
- [Changes Summary](CHANGES_SUMMARY.md) - What was modified for Amasty compatibility
- [Changelog](CHANGELOG.md) - Version history

Support
-------

[](#support)

For issues or questions:

1. Check [AMASTY\_INTEGRATION.md](AMASTY_INTEGRATION.md) troubleshooting section
2. Review Magento logs
3. Open an issue on GitHub

License
-------

[](#license)

MIT License - see [LICENSE](LICENSE) file for details

Credits
-------

[](#credits)

Original module by [Magenable](https://magenable.com.au)
Amasty compatibility by Petrevsky

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance45

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f8bc8ecbd23dfe191019f8f97ba9f40bb069fec208a79b5696834e0ad1882bd?d=identicon)[petrevsky](/maintainers/petrevsky)

---

Top Contributors

[![alek-s-andr](https://avatars.githubusercontent.com/u/34573954?v=4)](https://github.com/alek-s-andr "alek-s-andr (8 commits)")[![petrevsky](https://avatars.githubusercontent.com/u/26557883?v=4)](https://github.com/petrevsky "petrevsky (1 commits)")

### Embed Badge

![Health badge](/badges/petrevsky-amasty-captcha-bypass/health.svg)

```
[![Health](https://phpackages.com/badges/petrevsky-amasty-captcha-bypass/health.svg)](https://phpackages.com/packages/petrevsky-amasty-captcha-bypass)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
