
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
This gem allows you to take a new line delimited String, and pull out names, email addresses, and phone numbers. The String input can come from a file, STDIN, the output of another program, etc.
This concept has been specifically applied to business cards, but can easily be used more generically.
gem install ocr_challenge
or in your Gemfile
gem 'ocr_challenge'
1.) Create a contact with your input String
require 'ocr_challenge'
include OcrChallenge
text = """
Alexander Vanadio\n
execdd17@gmail.com\n
(123)-456-7890\n
"""
contact = IBusinessCardParser.get_contact_info(text)
2.) Get the information through your contact instance
contact.get_name # => "Name: Alexander Vanadio"
contact.get_email_address # => "Email: execdd17@gmail.com"
contact.get_phone_number # => "Phone: 123-456-7890"
contact.to_s # => "Name: Alexander Vanadio\nEmail: execdd17@gmail.com\nPhone: 123-456-7890"
Let's use a more complicated String input. The IBusinessCard parser will attempt to find all email addresses and phone numbers, but not fax numbers. Once it does, you can get them directly from your IContactInfo instance.
require 'ocr_challenge'
include OcrChallenge
text = """
Alexander Vanadio\n
Software Engineer
My Company Name
execdd17@gmail.com\n
anotherEmail@gmail.com\n
Phone: 1-(123)-456-7890\n
Cell: 123.444.7890\n
Fax: 892-234-5467
"""
contact = IBusinessCardParser.get_contact_info(text)
contact.to_s # => "Name: Alexander Vanadio\nEmail: anotherEmail@gmail.com\nEmail: execdd17@gmail.com\nPhone Number: 123-444-7890\nPhone Number: 123-456-7890\n"
# you can also access the names, email_addresses, and phone_numbers directly
contact.names
contact.email_addresses
contact.phone_numbers
cd orc_challenge
rspec
firefox coverage/index.html
FAQs
Unknown package
We found that ocr_challenge 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
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.