
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Detects timezone by address or location, using google or geoname web services. It will utilaze web services only if can't detect timezone by country code (when country has only one timezone)
Procedure for detecting time zone:
Add this line to your application's Gemfile:
gem 'tzdetect'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tzdetect
Can be set through block:
TZDetect::Configuration.begin do |c|
c.username = 'your_geonames_username'
end
or TZDetect::Configuration.service = :geoname TZDetect::Configuration.username = "username"
Configuration params:
If you use geoname service, make sure you have a geonames username. It's free and easy to setup, you can do so here.
Country with many timezones without position data: System will find location for Miami and then find timezone
tz = TimeZone.new("US", "Miami", "Florida")
tz.timezone.name # "America/New_York"
tz.latitude # 25.774265
tz.longitude # -80.193658
Country with many time zones with position data: System will directly find timezone with position data
tz = TimeZone.new("US", "Miami", "Florida", 25.774265, -80.193658)
tz.timezone.name # "America/New_York"
Country with one time zone will not return location data
tz = TimeZone.new("RS", "Novi Sad")
tz.timezone.name # "Europe/Belgrade"
tz.latitude # nil
tz.longitude # nil
Return TZInfo object
tz = TimeZone.get!("RS", "Novi Sad")
tz.name # "Europe/Belgrade"
tz = TimeZone.new("US", "Miami", "Florida", 25.774265, -80.193658)
tz.timezone.name # "America/New_York"
You can use class method by_location
TZDetect::TimeZone.by_location! 44.21, 21.0
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that tzdetect 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
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.