Skip to content
This repository was archived by the owner on Nov 16, 2024. It is now read-only.

Eth3rnit3/playwright_stealth

Repository files navigation

Archived

This project is archived and will no longer be maintained by its contributor due to a change in management. This project is now replaced by https://github.com/Eth3rnit3/chromate

PlaywrightStealth

Ruby Gem Release

Playwright Stealth is a Ruby gem that allows you to use Playwright with stealth mode. It patches Playwright to prevent detection.

Installation

Install the gem and add it to the application's Gemfile by executing:

bundle add playwright_stealth

If Bundler is not being used to manage dependencies, install the gem by executing:

gem install playwright_stealth

Usage

To use Playwright Stealth, require the gem in your Ruby script and initialize it as follows:

require 'playwright_stealth'

PlaywrightStealth.install unless PlaywrightStealth.installed?

PlaywrightStealth.browser(:chromium, headless: true) do |_context, page|
  page.goto('https://bot.sannysoft.com')
  sleep(1)
  page.screenshot(path: 'results/intoli.png')
end

Screenshots of Web Bot Detections

✅ Intoli (headless)

bundle exec rake test:intoli

Intoli Detection Screenshot Intoli Detection Screenshot 2

✅ Browserleaks (headless)

bundle exec rake test:browserleaks

Browserleaks Detection Screenshot

✅ Pixelscan (headless)

bundle exec rake test:pixelscan

Pixelscan Detection Screenshot

🟠 Brodetector (headless)

bundle exec rake test:brodetector

Brodetector Detection Screenshot

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run:

bundle exec rake install

To release a new version, update the version number in version.rb, and then run:

bundle exec rake release

This will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Eth3rnit3/playwright_stealth. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

Acknowledgements

This gem was built with the help of the following projects:

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the PlaywrightStealth project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the code of conduct.

About

Playwright Stealth is a Ruby gem that allows you to use Playwright with stealth mode

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors