Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Parses blocks of text to find phone numbers (including phonetic numbers), emails, and spammer urls
Find obfuscated phone numbers
>> message = "Contact me directly ( FOUR ONE FIVE E I G H T 9 FOUR TWO EIGHT SIX FIVE ). Hope you cracked that number code."
>> Ramparts.find_phone_numbers(message)
[{start_offset: 22, end_offset: 71, type: :phone, value: 'FOUR ONE FIVE E I G H T 9 FOUR TOO EIGHT SIX FIVE'}]
Find obfuscated emails.
>> message = "Looking for honest worker .. contact ashley73299 AT yahoo dot com for more info"
>> Ramparts.find_emails(message)
[{start_offset: 37, end_offset: 65, type: :email, value: 'ashley73299 AT yahoo dot com'}]
Find both obfuscated emails and phone numbers.
>> message = "Looking for honest worker .. contact ashley73299 AT yahoo dot com or FOUR FIVE ONE 456 8900 for more info"
>> Ramparts.find_phone_numbers_and_emails(message)
[{start_offset: 37, end_offset: 65, type: :email, value: 'ashley73299 AT yahoo dot com'}, {start_offset: 70, end_offset: 92, type: :phone, value: 'FOUR FIVE ONE 456 8900'}]
Count the occurrences of well known spam URLs and keywords
>> message = ""cialis vs viagra spam guestbook.php?action=http://cialiswalmart.shop""
>> Ramparts.count_urls(message)
3
In the root directory of your project
gem install ramparts
Remember to require ramparts
as necessary
require 'ramparts'
find_phone_numbers
FivE 4 3 F0r On3 67 NiN3
would be caught.F i v E 4 3 F 0 r O n 3 67 N i N 3
would be caught."If you're interested in this position, do contact me directly on my phone number ( FOUR ONE FIVE E I G H T 9 FOUR TWO EIGHT SIX FIVE ). Hope you cracked that number code."
1
"If you're interested in this position, do contact me directly on my phone number ( FOUR ONE FIVE E I G H T 9 FOUR TWO EIGHT SIX FIVE ). Hope you cracked that number code."
[{start_offset: 84, end_offset: 133, type: :phone, value: 'FOUR ONE FIVE E I G H T 9 FOUR TOO EIGHT SIX FIVE'}]
altered_text = replace_phone_numbers(...) do CENSORED end
"If you're interested in this position, do contact me directly on my phone number ( FOUR ONE FIVE E I G H T 9 FOUR TWO EIGHT SIX FIVE ). Hope you cracked that number code."
"If you're interested in this position, do contact me directly on my phone number ( CENSORED ). Hope you cracked that number code."
find_emails
False
]
.
or dot
+ a TLD at the end, but instead compares the last word against a well known list of email domains (eg. contact ashley @ yandex for more info
would be caught)"Hi, Are you seriously interested ..Looking for honest worker .. My e-mail is ashley73299 AT yahoo dot com, I repeat ashley73299 @ yahoo . com ?.. Ashley"
2
False
]
.
or dot
+ a TLD at the end, but instead compares the last word against a well known list of email domains (eg. contact ashley @ yandex for more info
would be caught)False
]
"Hi, Are you seriously interested ..Looking for honest worker .. My e-mail is ashley73299 AT yahoo dot com, I repeat ashley73299 @ yahoo . com ?.. Ashley"
[{start_offset: 78, end_offset: 106, type: :email, value: 'ashley73299 AT yahoo dot com'}, {start_offset: 118, end_offset: 143, type: :email, value: 'ashley73299 @ yahoo . com'}]
False
]
.
or dot
+ a TLD at the end, but instead compares the last word against a well known list of email domains (eg. contact ashley @ yandex for more info
would be caught)False
]
altered_text = replace_emails(...) do CENSORED end
"My name is Cynthia, a friend of mine needs a nanny to watch her baby in your area, her contact is ( jbush042@gmail.com ) She will be waiting to hear from you kindly send her an email now!"
My name is Cynthia, a friend of mine needs a nanny to watch her baby in your area, her contact is ( CENSORED ) She will be waiting to hear from you kindly send her an email now!
find_emails
FivE 4 3 F0r On3 67 NiN3
would be caught.F i v E 4 3 F 0 r O n 3 67 N i N 3
would be caught.False
]
.
or dot
+ a TLD at the end, but instead compares the last word against a well known list of email domains (eg. contact ashley @ yandex for more info
would be caught)False
]
"Hi, Are you seriously interested ..Looking for honest worker .. My e-mail is ashley73299 AT yahoo dot com, phone 416 090 78 NINE 5 ?.. Ashley"
2
FivE 4 3 F0r On3 67 NiN3
would be caught.F i v E 4 3 F 0 r O n 3 67 N i N 3
would be caught.False
]
.
or dot
+ a TLD at the end, but instead compares the last word against a well known list of email domains (eg. contact ashley @ yandex for more info
would be caught)False
]
"Hi, Are you seriously interested ..Looking for honest worker .. My e-mail is ashley73299 AT yahoo dot com, phone 416 090 78 NINE 5 ?.. Ashley"
[{start_offset: 78, end_offset: 106, type: :email, value: 'ashley73299 AT yahoo dot com'}, {start_offset: 115, end_offset: 132, type: :phone, value: 'FOUR FIVE ONE 456 8900'}]
FivE 4 3 F0r On3 67 NiN3
would be caught.F i v E 4 3 F 0 r O n 3 67 N i N 3
would be caught.False
]
.
or dot
+ a TLD at the end, but instead compares the last word against a well known list of email domains (eg. contact ashley @ yandex for more info
would be caught)False
]
altered_text = replace_phone_numbers_and_emails(...) do CENSORED end
"My name is Cynthia, a friend of mine needs a nanny to watch her baby in your area, her contact is ( jbush042@gmail.com or FOUR FIVE ONE 789 4568 ) She will be waiting to hear from you kindly send her an email now!"
My name is Cynthia, a friend of mine needs a nanny to watch her baby in your area, her contact is ( CENSORED or CENSORED ) She will be waiting to hear from you kindly send her an email now!
"cialis vs cialis spam guestbook.php?action=http://cialiswalmart.shop"
3
FAQs
Unknown package
We found that ramparts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.