
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Fast, threaded client for the Apple Push Notification Service.
Lead Zeppelin requires Ruby 1.9. It is tested on MRI. Because it uses threads, it probably runs better on JRuby and Rubinius, but has not yet been tested (feedback welcome).
Add this line to your application's Gemfile:
gem 'lead_zeppelin'
And then execute:
$ bundle
Or install it yourself as:
$ gem install lead_zeppelin
Require the gem, set threads to throw exceptions (optional, but recommended for now):
require 'lead_zeppelin'
Thread.abort_on_exception = true
Instantiate a new client and configure it by adding the block of code to handle error responses, and . Provide client.on_error before adding applications.
client = LeadZeppelin::APNS::Client.new do |c|
c.on_notification_error do |error_response|
puts "Apple sent back an error response: #{error_response.inspect}"
end
c.on_certificate_error do |app|
puts "Certificate error failed for #{app}"
end
# You can provide .p12 files too! p12: File.read('./yourapp.p12')
c.add_application :your_app_identifier, pem: File.read('./yourapp.pem')
end
Add a poller to read messages via a method of your choosing:
# Poll every second, join parent (main) thread so it doesn't close
client.poll(1, join_parent_thread: true) do |c|
c.message :demoapp, 'YOUR_DEVICE_TOKEN_GOES_HERE', "testing!"
end
If you already have the generated JSON payload, you can inform the message sender to not encode to JSON:
c.message :demoapp, 'YOUR_DEVICE_TOKEN_GOES_HERE', '{"aps":{"alert":"Now Playing: Dazed and Confused"}}', raw: true
LeadZeppelin#logger takes a Logger class:
require 'logger'
LeadZeppelin.logger = Logger.new(STDERR)
To watch the thread flow, pass an IO to LeadZeppelin#thread_logger (but not a Logger):
LeadZeppelin.thread_logger = STDERR
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that lead_zeppelin 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.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.