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

secure-rm

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

secure-rm

Completely erases files by making recovery impossible.

latest
Source
npmnpm
Version
4.2.0
Version published
Maintainers
1
Created
Source

secure-rm
Completely erases files by making recovery impossible.

Version Downloads/week License: MIT

Build Status: master Build Status: develop Code coverage

❓ Why

When you delete a file using the rm command or fs.unlink in node, it only removes direct pointers to the data disk sectors and make the data recovery possible with common software tools.

Permanent data erasure goes beyond basic file deletion commands, which:

  • Allow for selection of a specific standard, based on unique needs,
  • Verify the overwriting method has been successful and removed data across the entire device.

📦 Installation

Node and npm required.

npm install secure-rm

Looking for a command line interface? Click here.

🚀 Getting started

If you want your application to delete specific files with a pass of cryptographically strong pseudo-random data, use one of these code snippets:

Callback version

const srm = require('secure-rm')

srm('./folder/*.js', (err) => {
  if (err) throw err
  console.log('Files successfully deleted !')
})

Promise version

const srm = require('secure-rm')

srm('./folder/*.js')
  .then(() => console.log('Files successfully deleted !'))
  .catch((err) => {throw err})

📚 Usage

Visit the wiki to discover all the possibilities secure-rm offers!

Examples:

const options = {
  standard: 'gutmann',
  maxBusyTries: 5,
  disableGlob: true
}

srm('./data/*.js', options, (err) => {
  if (err) throw err
  console.log('Files successfully deleted !')
})

srm('./trash/dir/', { standard: 'preview' }, (err, fileTree) => {
  if (err) throw err
  console.log('Files that would be deleted:' + fileTree)
})

📜 Changelog / History

See the changelog or releases.

📌 TODO

  • Implement more tests
  • Support of 64bit files

🏗 Contributing

Dependencies Contributors Last commit npm collaborators

Tested with Jest Node version language

See contributing guidelines

Licensing

This project is under MIT License.

Keywords

privacy

FAQs

Package last updated on 02 Nov 2019

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