Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
is-port-reachable
Advanced tools
Package description
The is-port-reachable npm package is used to check if a port is reachable on a given host. It is useful for network diagnostics and monitoring, allowing developers to programmatically verify if services are accessible over the network.
Check port reachability
This feature allows you to check if a specific port on a host is reachable. The function returns a boolean indicating whether the port is open or not.
const isPortReachable = require('is-port-reachable');
(async () => {
const reachable = await isPortReachable(80, {host: 'example.com'});
console.log(reachable); // true or false
})();
The portscanner package is similar to is-port-reachable and provides more comprehensive functionality for scanning ports, including checking a range of ports and providing detailed status for each port.
tcp-ping allows you to perform TCP pings to a server, which includes checking if a port is open. It provides additional information such as latency measurements, which is-port-reachable does not offer.
wait-for-port is another package that can be used to wait for a port on a host to become available. It is useful for scenarios where you need to wait for a service to start up before performing actions that depend on that service.
Readme
Check if a local or remote port is reachable
npm install is-port-reachable
import isPortReachable from 'is-port-reachable';
console.log(await isPortReachable(80, {host: 'google.com'}));
//=> true
Returns Promise<boolean>
for whether the port is reachable.
Type: number
The port to check.
Type: object
Required
Type: string
Example: 'localhost'
The host to check.
Can be a domain (optionally, with a sub-domain) or an IP address.
Type: number
Default: 1000
The time to wait in milliseconds before giving up.
FAQs
Check if a local or remote port is reachable
The npm package is-port-reachable receives a total of 1,315,305 weekly downloads. As such, is-port-reachable popularity was classified as popular.
We found that is-port-reachable 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.