Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
browserstack-screenshot
Advanced tools
A ruby gem for BrowserStack's Screenshot API.
Add this line to your application's Gemfile:
gem 'browserstack-screenshot'
And then execute:
bundle
Or install it yourself as:
gem install browserstack-screenshot
First, you need to require the screenshot gem:
require 'screenshot'
Creates a new client instance.
settings
: A hash of settings that apply to all requests for the new client.
:username
: The username for the BrowserStack account.:password
: The password for the BrowserStack account.settings = {:username => "foo", :password => "foobar"}
client = Screenshot::Client.new(settings)
###API
####Getting available os and browsers Fetches all available browsers. API info
client.get_os_and_browsers #returns a hash
####Generating Screenshots Frame the config object according to the format given. Format info
Eg settings object:
params = {
:url => "www.google.com",
:callback_url => "http://example.com/pingback_url",
:win_res => "1024x768", #Options : "1024x768", "1280x1024"
:mac_res => "1920x1080", #Options : "1024x768", "1280x960", "1280x1024", "1600x1200", "1920x1080"
:quality => "compressed", #Options : "compressed", "original"
:wait_time => 5, #Options: 2, 5, 10, 15, 20, 60
:orientation => "portrait", #Options: "portrait", "landscape"
:tunnel => false,
:browsers => [
{:os=>"Windows",:os_version=>"7",:browser=>"ie",:browser_version=>"8.0"},
{:os=>"Windows",:os_version=>"XP",:browser=>"ie",:browser_version=>"7.0"}
]
}
callback_url
, win_res
, mac_res
, quality
, wait_time
, orientation
and tunnel
being optional parameters.
#####For testing Local/Internal Server setup
:tunnel => true
in the params objectA request id is returned when a valid request is made.
request_id = client.generate_screenshots params
####Checking/Polling the status of the request Use this method to check if the requested screenshots are complete.
client.screenshots_done? request_id #returns `true` or `false`
Or you can fetch the request state
client.screenshots_status request_id #returns `queue` or `processing` or `done`
####Fetching the response of the requested screenshots
client.screenshots request_id
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that browserstack-screenshot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.