Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var net = require("net");
- console.log("waiting");
- var server = net.createServer(function(socket){
- socket.on("data", function(d){
- console.log("[*] we are taliking to somebody");
- console.log("[*] data")
- console.log(d);
- var buf = new Buffer(10);
- d.copy(buf);
- console.log("[*] buffer:")
- console.log(buf);
- console.log(" ");
- var data = JSON.parse(d);
- console.log(data.method);
- console.log(data.user);
- console.log(data.pas);
- socket.write("Server !O! is online!");
- });
- });
- server.listen(1111);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement