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.
Terminal platform query methods for detecting different operating systems and their properties.
TTY::Platform provides independent operating system detection component for TTY toolkit.
Add this line to your application's Gemfile:
gem 'tty-platform'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tty-platform
With TTY::Platform you can find out the properties of your operating system by creating an instance:
platform = TTY::Platform.new
To query for processor name use cpu
method:
platform.cpu # => 'x86_64'
A nil
is returned if the value cannot be determined.
To get the system/OS name use os
method:
platform.os # => 'darwin'
A nil
is returned if the value cannot be determined.
To get system's release version use version
method:
platform.version # => '10.6.1'
A nil
is returned. Note that many platforms do not provide this information.
In addition, you can use more generic methods to check the type of operating system out of windows
, linux
, mac
and unix
:
platform.windows? # => false
platform.unix? # => true
platform.linux? # => false
platform.mac? # => true
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Copyright (c) 2015 Piotr Murach. See LICENSE for further details.
FAQs
Unknown package
We found that tty-platform 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.