Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Renames audio or video files using their metadata tags
Make sure you have ffprobe installed (it comes with FFmpeg), and run:
npm install tagtoname
Usage: tagtoname [-k] [-n] [-s separator] [-t tag]... path...
Renames the files at path(s) to a URL-safe name using the metadata tag(s).
Options:
-k, --keep-case Keep the case from the tags when renaming
-n, --noop Dry run, show new paths without renaming the files
-s, --separator=SEPARATOR Split tags with SEPARATOR;
defaults to -s-
-t, --tag=TAG Append TAG(s) to the new name;
defaults to -t ARTIST -t artist -t TITLE -t title
--help Show help
--version Output the version number
For example, by default a file with the "mp3" ext, the ARTIST tag "Beethoven",
and the TITLE tag "Ode to Joy" is renamed to "beethoven-ode-to-joy.mp3".
# Rename a file.
# For example, if the file has the "artist" tag "Beethoven", and the "title" tag
# "Ode to Joy", by default it will be renamed to "beethoven-ode-to-joy.mp3".
tagtoname file.mp3
# Rename all files in a folder (recursively).
tagtoname folder
# Rename a file and keep the case from the tags instead of lowercasing.
# For example, if the file has the "artist" tag "Philip Glass", and the "title"
# tag "Opening", it will be renamed to "Philip-Glass-Opening.mp3".
tagtoname -k file.mp3
# Dry run, output what would happen if we were to rename all files in a folder.
tagtoname -n folder
# Rename a file using a custom separator.
# For example, if the file has the "artist" tag "Debussy", and the "title" tag
# "Reverie", it will be renamed to "debussy_reverie.mp3".
tagtoname -s _ file.mp3
# Rename a file using specific tags.
# For example, if the file has the "title" tag "A Clockwork Orange", and the
# "year" tag "1971", it will be renamed to "a-clockwork-orange-1971.mp4".
tagtoname -t title -t year file.mp4
tagtoname(paths, options)
Renames the audio or video files using their metadata tags.
The given paths
can be files or directories, in which case it recursively
traverses them.
The second argument is an options object with the following properties:
keepCase
: Keep the case from the tags when renaming, defaults to false
noop
: Whether to perform a dry run and not rename files, defaults to false
separator
: The separator used to split the tags in the name, defaults to "-"
tags
: An array of tags to use in the new name of the file, defaults to ["ARTIST", "artist", "TITLE", "title"]
Returns an EventEmmiter
object with the following events:
"success"
, emitted when the new path is different from the old path, passing the new path (string) to the callback"abort"
, emitted when the new path is the same as the old path, passing the old path (string) to the callback"error"
, emitted when a file cannot be renamed, passing the Error
object to the callback"complete"
, emitted when all files have been processedimport tagtoname from "tagtoname";
// Rename the files at /path/to/folder/ using the "artist" and "title" tags
tagtoname(["/path/to/folder/"], { tags: ["artist", "title"] })
.on("success", newPath => console.log(newPath))
.on("abort", oldPath => console.log(`${oldPath} (unchanged)`))
.on("error", error => console.error(error.message));
FAQs
Renames audio files using the metadata tags
We found that tagtoname demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.