{"id":28437026,"url":"https://github.com/ronin-rb/ronin-web-browser","last_synced_at":"2026-03-09T13:36:42.117Z","repository":{"id":66691451,"uuid":"598705125","full_name":"ronin-rb/ronin-web-browser","owner":"ronin-rb","description":"A Ruby library for automating the Chrome web browser","archived":false,"fork":false,"pushed_at":"2025-02-02T22:41:09.000Z","size":50,"stargazers_count":9,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-05T07:54:12.406Z","etag":null,"topics":["chrome","headless-chrome","web-browser"],"latest_commit_sha":null,"homepage":"https://ronin-rb.dev","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ronin-rb.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"COPYING.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"open_collective":"ronin-rb","patreon":"roninrb"}},"created_at":"2023-02-07T16:43:17.000Z","updated_at":"2025-02-02T22:41:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a5140f1-d899-4452-b2da-a83f22727e9c","html_url":"https://github.com/ronin-rb/ronin-web-browser","commit_stats":{"total_commits":50,"total_committers":3,"mean_commits":"16.666666666666668","dds":"0.040000000000000036","last_synced_commit":"f41cfc1c4befb592e22c33d3162b0053c4ab2c85"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ronin-rb/ronin-web-browser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronin-rb%2Fronin-web-browser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronin-rb%2Fronin-web-browser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronin-rb%2Fronin-web-browser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronin-rb%2Fronin-web-browser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ronin-rb","download_url":"https://codeload.github.com/ronin-rb/ronin-web-browser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronin-rb%2Fronin-web-browser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259759067,"owners_count":22906894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chrome","headless-chrome","web-browser"],"created_at":"2025-06-05T23:08:30.182Z","updated_at":"2026-03-09T13:36:42.073Z","avatar_url":"https://github.com/ronin-rb.png","language":"Ruby","funding_links":["https://opencollective.com/ronin-rb","https://patreon.com/roninrb"],"categories":[],"sub_categories":[],"readme":"# ronin-web-browser\n\n[![CI](https://github.com/ronin-rb/ronin-web-browser/actions/workflows/ruby.yml/badge.svg)](https://github.com/ronin-rb/ronin-web-browser/actions/workflows/ruby.yml)\n[![Code Climate](https://codeclimate.com/github/ronin-rb/ronin-web-browser.svg)](https://codeclimate.com/github/ronin-rb/ronin-web-browser)\n\n* [Website](https://ronin-rb.dev/)\n* [Source](https://github.com/ronin-rb/ronin-web-browser)\n* [Issues](https://github.com/ronin-rb/ronin-web-browser/issues)\n* [Documentation](https://ronin-rb.dev/docs/ronin-web-browser/frames)\n* [Discord](https://discord.gg/6WAb3PsVX9) |\n  [Mastodon](https://infosec.exchange/@ronin_rb)\n\n## Description\n\nronin-web-browser is a Ruby library for automating the Chrome web browser.\nronin-web-browser builds on the [ferrum] gem, and adds additional API methods\nthat are useful to security researchers.\n\n## Features\n\n* Automates the Chrome web browser.\n* Supports running in visible or headless mode.\n* Supports using a HTTP proxy.\n* Supports event hooks for requests and responses.\n* Supports parsing, setting, loading, and saving cookies.\n* Supports saving screenshots into a directory or git repository.\n* Small memory footprint (~50Kb Ruby + ~600Kb headless Chrome).\n* Has 81% documentation coverage.\n* Has 82% test coverage.\n\n## Examples\n\nInitialize a headless browser:\n\n```ruby\nbrowser = Ronin::Web::Browser.new\n# ...\nbrowser.quit\n```\n\nInitialize a visible browser:\n\n```ruby\nbrowser = Ronin::Web::Browser.new(visible: true)\n# ...\nbrowser.quit\n```\n\nOpening a temporary browser and automatically quitting:\n\n```ruby\nRonin::Web::Browser.open do |browser|\n  # ...\nend\n```\n\nInitializing the browser with a proxy:\n\n```ruby\nbrowser = Ronin::Web::Browser.new(proxy: \"http://proxy.example.com:8080\")\n# ...\n```\n\nGo to and screenshot a webpage:\n\n```ruby\nRonin::Web::Browser.open do |browser|\n  browser.go_to(\"https://google.com\")\n  browser.screenshot(path: \"google.png\")\nend\n```\n\nIntercept all requests:\n\n```ruby\nbrowser = Ronin::Web::Browser.new\nbrowser.every_request do |request|\n  puts \"\u003e #{request.method} #{request.url}\"\nend\n\nbrowser.go_to(\"https://twitter.com/login\")\n```\n\nIntercept all responses for all requests:\n\n```ruby\nbrowser = Ronin::Web::Browser.new\nbrowser.every_response do |response,request|\n  puts \"\u003e #{request.method} #{request.url}\"\n\n  puts \"\u003c HTTP #{response.status}\"\n\n  response.headers.each do |name,value|\n    puts \"\u003c #{name}: #{value}\"\n  end\n\n  puts response.body\nend\n\nbrowser.go_to(\"https://twitter.com/login\")\n```\n\nEvaluate JavaScript within the current page:\n\n```ruby\nbrowser = Ronin::Web::Browser.new\nbrowser.goto('https://github.com')\nbrowser.eval_js('document.cookie')\n# =\u003e \"...\"\n```\n\nLoad a JavaScript file into the current page as a `\u003cscript\u003e` tag:\n\n```ruby\nbrowser.load_js(url: 'https://.../file.js')\n```\n\nLoad JavaScript code into the current page as a `\u003cscript\u003e` tag:\n\n```ruby\nbrowser.load_js(content: '...')\n```\n\nInject JavaScript code into *every* page:\n\n```ruby\nbrowser.inject_js('...')\n```\n\nSee [ferrum] for additional documentation.\n\n## Requirements\n\n* [Ruby] \u003e= 3.0.0\n* [ronin-support] ~\u003e 1.0\n* [ferrum] ~\u003e 0.13\n\n## Install\n\n```shell\n$ gem install ronin-web-browser\n```\n\n### Gemfile\n\n```ruby\ngem 'ronin-web-browser', '~\u003e 0.1'\n```\n\n### gemspec\n\n```ruby\ngem.add_dependency 'ronin-web-browser', '~\u003e 0.1'\n```\n\n## Development\n\n1. [Fork It!](https://github.com/ronin-rb/ronin-web-browser/fork)\n2. Clone It!\n3. `cd ronin-web-browser/`\n4. `bundle install`\n5. `git checkout -b my_feature`\n6. Code It!\n7. `bundle exec rake spec`\n8. `git push origin my_feature`\n\n## License\n\nCopyright (c) 2022-2024 Hal Brodigan (postmodern.mod3@gmail.com)\n\nronin-web-browser is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as published\nby the Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nronin-web-browser is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with ronin-web-browser.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n\n[Ruby]: https://www.ruby-lang.org\n[ronin-support]: https://github.com/ronin-rb/ronin-support#readme\n[ferrum]: https://github.com/rubycdp/ferrum#readme\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronin-rb%2Fronin-web-browser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fronin-rb%2Fronin-web-browser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronin-rb%2Fronin-web-browser/lists"}