-
-
Save nomoney4me/931eab530c84e210aceb9ca2b2059948 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const nexpect = require('nexpect') | |
| nexpect.spawn('sudo openfortivpn -c /openfortivpn.conf') | |
| .wait("Two-factor authentication token:", () => { | |
| console.log('enter your 2factor auth code:') | |
| }) | |
| .wait("INFO: Tunnel is up and running.", () => { | |
| console.log('tunnel is up and running') | |
| }) | |
| .run((err, stdout, exitcode) => { | |
| if(err) console.log(err) | |
| console.log(stdout) | |
| //console.log('found you, inputting numbers now') | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment