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.
= numb
Returns any numbers, currency or percentages it can find.
Currencies are returned using the standard currency codes (see wikipedia for example) {:value => 10.00, :percent => true, :currency => 'EUR'} Note: Currently, 'kr' will return 'DKK' even though this is the currency symbol for Sweden, Danmark and Norway. This issue exists for other currencies as well. New Options: :require => :currency :value :percent Throws an error if the required field isn't there. Can be combined: Numb.new(:require => [:currency, :value])
:split => ['
', '//']
Splits the fields based on the passed variables in the order they are passed
:debug => true Prints out debugging info.
== Examples
Numb.new.parse("US$1.00 ") # => {:currency => 'USD', :value => 1.00}
Numb.new.parse('12.34%') # => {:percent => true, :value => 12.34}
== Supported Currencies
ALL AFN ARS AWG AUD AZN BSD BBD BYR BZD BMD BOB BAM BWP BGN BRL BND KHR CAD KYD CLP CNY COP CRC HRK CUP CZK DOP XCD EGP SVC EEK FKP FJD GHC GIP GTQ GGP GYD HNL HKD HUF ISK IDR IRR IMP ILS JMD JPY JEP KZT KPW KRW KGS LAK LVL LBP LRD CHF LTL MKD MYR MUR MXN MNT MZN NAD NPR ANG NZD NIO NGN KPW NOK OMR PKR PAB PYG PEN PHP PLN QAR RON RUB SHP SAR RSD SCR SBD SOS ZAR KRW LKR CHF SRD SYP TWD THB TTD TRY TRL TVD UAH UYU UZS VEF VND YER ZWD
== Duplicate currencies which will not correctly identify PRIMARY = { '£' => 'GBP', 'kr' => 'DKK', '$' => 'USD', '¥' => 'JPY', 'ƒ' => 'AWG', }
DUPLICATES = { '£' => ['EGP', 'FKP', 'GIP', 'GGP', 'IMP', 'JEP', 'LBP', 'SHP', 'SYP', 'EEK'], 'kr' => ['ISK', 'NOK', 'SEK'], '$' => ['ARS', 'AUD', 'BSD', 'BBD', 'BMD', 'BND', 'CAD', 'KYD', 'CLP', 'COP', 'FJD', 'GYD', 'HKD', 'LRD', 'MXN', 'NAD', 'NZD', 'SGD', 'SBD', 'SVC', 'TVD', 'SRD', 'XCD'], '¥' => 'CNY', 'ƒ' => 'ANG', }
== Copyright
Copyright (c) 2009 TrafficBroker Ltd. See LICENSE for details.
FAQs
Unknown package
We found that trafficbroker-numb 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.