Created
February 28, 2017 23:11
-
-
Save io4/f751c2a5df2083c7824c2ab5fed09646 to your computer and use it in GitHub Desktop.
[ROOT] Make node.js takeover a tty. Do Ctrl-Alt-F3
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
const fs = require("fs"); | |
const child_process = require("child_process"); | |
var stdio = [ | |
fs.openSync("/dev/tty3","w+"), | |
fs.openSync("/dev/tty3","r+"), | |
fs.openSync("/dev/tty3","r+") | |
]; | |
child_process.spawn("/bin/bash", [], {stdio}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment