New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

hash-files-cmd

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hash-files-cmd

A wrapper around https://github.com/mac-/hash-files designed to be used for scripting in the windows shell (cmd).

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

hash-files-cmd

A wrapper around hash-files.

  • designed to be used for scripting in the windows shell (cmd)
  • compares the calculated hash with a stored hash
  • exits with a non-zero exit code if the hashes are not equal

Installation

npm install hash-files

Usage

./bin/hash-files-cmd --files package.json --hash-file .package.json.hash

Specify one or more globs to create the hash for: --files fileOrGlob1, [fileOrGlob2, ...]

Define a filename for the hash: --hash-file fileName

Approach

  • calculates the hash for the given --files (file(s)/glob(s)()
  • tries to read the old hash from the given --hash-file
  • stores the calculated hash in the given hash-file
  • exits with an error code of -1 if
    • hash-file did not exist before
    • the old hash differs from the current hash
  • exits without an error if the hashes are equal

Limitations

Commandline parameters for hash-files are not exposed.

Feel free to make a PR.

Keywords

node

FAQs

Package last updated on 13 Jun 2022

Did you know?

Socket

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.

Install

Related posts