
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.
rich_email_validator
Advanced tools
A set of helpers to validate emails:
It works as follows:
Add this line to your application's Gemfile:
gem 'rich_email_validator'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rich_email_validator
require 'rich_email_validator'
RichEmailValidator.valid_email?('khellls@gmail.com') # => true
RichEmailValidator.valid_email?('khellls@g.com') # => false because of DNS lookup check
It's only used for performace reasons to filter the format of an email before doing a DNS lookup check.
The current value is:
/\A[\w!#$%&'*+\/=?`{|}~^-]+(?:\.[\w!#$%&'*+\/=?`{|}~^-]+)*@(?:[A-Z0-9-]+\.)+[A-Z]{2,6}\Z/i
You can change it:
# Customized email regular expression
RichEmailValidator.email_regexp = /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
list = ['khellls@g.com', 'khellls@gmail.com']
RichEmailValidator.filter_list(list) #=> ["khellls@gmail.com"]
# You have a fine grained control, so you can control threads count
# Default is 20, max 100
RichEmailValidator.filter_list(list, threads_count: 15)
file_path = '/path/to/emails_list'
File.readlines(file_path).size #=> 15
RichEmailValidator.filter_file(file_path).size #=> 10
# You have a fine grained control, so you can control threads count
# Default is 20, max 100
RichEmailValidator.filter_file(file_path, threads_count: 15)
file_path = '/path/to/emails_list'
output_path = '/path/to/output'
File.readlines(file_path).size # => 15
RichEmailValidator.export_valid_list(file_path, output_path)
File.readlines('output.txt').size #=> 10
# You have a fine grained control, so you can control threads count
# Default is 20, max 100
RichEmailValidator.export_valid_list(file_path, output_path, threads_count: 15)
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that rich_email_validator 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.