
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Open a URL via the operating system (http: in default browser, mailto: in mail client etc.
The openurl npm package allows you to open URLs, files, and email addresses in the default application for your operating system. It is a simple utility that can be used to trigger the default browser, email client, or file viewer.
Open a URL in the default web browser
This feature allows you to open a specified URL in the default web browser of the user's operating system.
const openurl = require('openurl');
openurl.open('http://www.google.com');
Open a file in the default application
This feature allows you to open a specified file in the default application associated with the file type on the user's operating system.
const openurl = require('openurl');
openurl.open('/path/to/your/file.txt');
Open an email client with a pre-filled email
This feature allows you to open the default email client with a new email draft pre-filled with the specified recipients, subject, and body.
const openurl = require('openurl');
openurl.mailto(['example@example.com'], { subject: 'Hello', body: 'Hello, world!' });
The 'open' package provides similar functionality to 'openurl' by allowing you to open files, URLs, and email addresses in the default application. It offers more options and better cross-platform support compared to 'openurl'.
The 'opn' package (now deprecated in favor of 'open') also allows you to open files and URLs in the default application. It is known for its simplicity and ease of use, similar to 'openurl'.
The 'open-cli' package is a command-line interface for the 'open' package, allowing you to open files and URLs from the command line. It is useful for scripting and automation purposes.
openurl is a Node.js module for opening a URL via the operating system. This will usually trigger actions such as:
Example interaction on the Node.js REPL:
> require("openurl").open("http://rauschma.de")
> require("openurl").open("mailto:john@example.com")
You can generate emails as follows:
require("openurl").mailto(["john@example.com", "jane@example.com"],
{ subject: "Hello!", body: "This is\nan automatically sent email!\n" });
Install via npm:
npm install openurl
I’m not yet terribly familiar with implementing npm packages, so any feedback is welcome (especially experience reports on Windows and Linux, which I can’t test on).
Related reading:
FAQs
Open a URL via the operating system (http: in default browser, mailto: in mail client etc.
The npm package openurl receives a total of 555,192 weekly downloads. As such, openurl popularity was classified as popular.
We found that openurl 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.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.