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.
Gateway for Platon processing center (https://platon.ua/)
gem 'platon'
And then execute:
$ bundle
Or install it yourself as:
$ gem install platon
Rails.application.routes.draw do
mount Platon::Engine => "/platon"
end
Methods which called when something happen.
Platon::Callbacks.setup.success =->(_result) { puts 'success' }
Platon::Callbacks.setup.failed =->(_result) { puts 'failed' }
Platon::Callbacks.setup.error =->(_result) { puts 'error' }
# product description (important keys)
data = {amount: '99.99', currency: 'USD', description: 'Show desciption less that 255 byte'}
# product order id (important key)
order = 1892
# addition field in form :name, :value
ext = [{name: 'discont', value: 10}]
@service = Platon::FormService.call(data, order: order, extra_fields: ext)
# views/pay/index.html.erb
<form action="<%= @service.form_prop[:url] %>" method="<%= @service.form_prop[:method] %>">
<% @service.fields.map do |field| %>
<input type="<%= field[:type] %>" name="<%= field[:name] %>" value="<%= field[:value] %>">
<% end %>
<input type="submit" value="Pay">
</form>
# /app/controllers/callback_controller.rb
def create
service = Platon::CallbackService.call(params)
if service.success?
head :ok
else
head :bad_request
end
end
gem 'dotenv-rails'
# config/application.rb
Bundler.require(*Rails.groups)
Dotenv::Railtie.load
PLATON_KEY=XXXXXXXXXX
PLATON_PASSWORD=XXXXXXXXXX
PLATON_URL=https://secure.platononline.com/payment/auth
PLATON_CALLBACK_URL=http://localhost/platon
PLATON_PAYMENT_METHOD=CC
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that platon.ua 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
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.