Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
This gem does one thing: determine if the supplied string matches a known crawler or bot. It matches against a very short list of strings found in the user agents that represent over 95% of crawler traffic. IMO, if it ain't detected, it ain't important.
Add this line to your application's Gemfile:
gem 'is_crawler'
And then execute:
$ bundle
Or install it yourself as:
$ gem install is_crawler
You can use the is_crawler?
method with just a user agent string to determine if it matches any crawler, like so:
class MyController < ActionController::Base
include IsCrawler
def index
if is_crawler? request.env["HTTP_USER_AGENT"]
render 'special_crawler_index'
else
render 'normal_boring_index'
end
end
end
...or provide one or more crawlers to find out if the string matches specific crawlers:
is_crawler?("Some User Agent/1.0", :facebook, :google)
...or you can use the method sugar:
is_facebook_crawler? request.env["HTTP_USER_AGENT"]
...and you can add to the list of detectables:
Crawler::CUSTOM << Crawler.new(:custom_crawler_name, "string that is always present in the crawler's user agent")
That's it!
Missing out on a noteworthy crawler? Find a problem? Ideas for improvement?
Raise an issue, or:
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that is_crawler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.