Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Resourceful provides a convenient Ruby API for making HTTP requests.
Features:
gem install resourceful
require 'resourceful'
resp = Resourceful.get('http://rubyforge.org')
puts resp.body
my_realm_authenticator = Resourceful::BasicAuthenticator.new('My Realm', 'admin', 'secret')
http = Resourceful::HttpAccessor.new(:authenticator => my_realm_authenticator)
resp = http.resource('http://example.com/').get
puts resp.body
Resourceful will by default follow redirects on read requests (GET and HEAD), but not for POST, etc. If you want to follow a redirect after a post, you will need to set the resource#on_redirect callback. If the callback evaluates to true, it will follow the redirect.
resource = http.resource('http://example.com/redirect_me')
resource.on_redirect { |req, resp| resp.header['Location'] =~ /example.com/ }
resource.get # Will only follow the redirect if the new location is example.com
require 'resourceful'
http = Resourceful::HttpAccessor.new
resp = http.resource('http://mysite.example/service').
post(Resourceful::UrlencodedFormData.new(:hostname => 'test', :level => 'super'))
require 'resourceful'
http = Resourceful::HttpAccessor.new
form_data = Resourceful::MultipartFormData.new(:username => 'me')
form_data.add_file('avatar', '/tmp/my_avatar.png', 'image/png')
resp = http.resource('http://mysite.example/service').post(form_data)
require 'resourceful'
http = Resourceful::HttpAccessor.new
resp = http.resource('http://mysite.example/service').
put('<?xml version="1.0"?><test/>', :content_type => 'application/xml')
require 'resourceful'
http = Resourceful::HttpAccessor.new
resp = http.resource('http://mysite.example/service').delete
Copyright (c) 2008 Absolute Performance, Inc, Peter Williams. Released under the MIT License.
FAQs
Unknown package
We found that resourceful 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.