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

gulp-dir-cipher

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-dir-cipher

gulp-dir-cipher

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

gulp-dir-cipher

gulp中间件: gulp-dir-cipher, 使用base64+blowfish的方式, 对整个目录下的所有文件进行加密, 包括加密文件名、目录名、文件内容

install

npm i gulp-dir-cipher

use

import gulp from 'gulp';
import gulpDirCipher, { checkPassword, encodeDirname, decodeDirname } from 'gulp-dir-cipher';

const password = 'juln1234';

if (!checkPassword(password)) {
  process.exit();
}

// encoding
gulp.src(['/Volumes/dev/gulp-dir-cipher/src/**/**', '!/Volumes/dev/gulp-dir-cipher/src'])
  .pipe(gulpDirCipher(password, 'encoding', { debug: true }))
  .pipe(gulp.dest('/Volumes/dev/gulp-dir-cipher/dist'))

setTimeout(() => {
  // decoding
  gulp.src(['/Volumes/dev/gulp-dir-cipher/dist/**/**', '!/Volumes/dev/gulp-dir-cipher/dist'])
    .pipe(gulpDirCipher(password, 'decoding', { debug: true }))
    .pipe(gulp.dest('/Volumes/dev/gulp-dir-cipher/dist/source'))
}, 2000)

Keywords

base64

FAQs

Package last updated on 25 May 2023

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