
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.
= Address Logic
This is a simple library that takes away the annoyances of displaying addresses in a view. Since various parts of an address can sometimes be optional, such as "street2", displaying addresses was not fun:
= address.street1 %br
That's just ugly. Instead, you can do this with Address Logic:
= address.address_parts.join("
")
Or, what about a single line address?
= address.address_parts.join(", ")
Maybe you only want city and state:
= address.address_parts(:only => [:city, :state]).join(", ")
Granted the above is probably easier without using AddressLogic, but it will purge any blank items in the address, so if city or state are optional then it would be cleaner to use AddressLogic.
== Install and use
Install from rubyforge
$ sudo gem install addresslogic
Install from github:
$ sudo gem install binarylogic-addresslogic
Or as a plugin
$ sudo script/plugin install git://github.com/binarylogic/addresslogic.git
Then just include the AddressLogic module into any class of your choice. All that it assumes is that you have the street1, street2, city, state, zip, country (optional) methods.
class Address apply_addresslogic end
You can specify the fields too:
class Address apply_addresslogic :fields => [:street1, :street2, :city, [:state, :zip], :country] end
== Helpful links
Copyright (c) 2009 Ben Johnson of Binary Logic, released under the MIT license
FAQs
Unknown package
We found that addresslogic 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.