Skip to content

Commit d8da720

Browse files
committed
no message
1 parent 5ab3dfb commit d8da720

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

dist/index.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var args, ask, dhcpd, httpd, ip, pkg, port, servers, tftp;
1+
var args, ask, dhcpd, httpd, ip, pkg, port, rl, servers, tftp;
22

33
pkg = require('../package.json');
44

@@ -36,6 +36,16 @@ if (args.tftp) {
3636
});
3737
}
3838

39+
if (process.platform === 'win32') {
40+
rl = require('readline').createInterface({
41+
input: process.stdin,
42+
output: process.stdout
43+
});
44+
rl.on('SIGINT', function() {
45+
return process.emit('SIGINT');
46+
});
47+
}
48+
3949
process.on('SIGINT', function() {
4050
console.log("\nshutting down servers from SIGINT (Ctrl+C)");
4151
servers.forEach(function(server) {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tch-exploit",
3-
"version": "2.0.1-rc5",
3+
"version": "2.0.1-rc6",
44
"main": "dist/index.js",
55
"bin": "dist/index.js",
66
"scripts": {

src/index.coffee

+9-1
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,17 @@ else
4141
servers.push dhcpd ip, url, args.acspass
4242
servers.push httpd ip, p, url
4343

44+
if process.platform is 'win32'
45+
rl = require('readline').createInterface
46+
input: process.stdin
47+
output: process.stdout
48+
49+
rl.on 'SIGINT', ->
50+
process.emit 'SIGINT'
51+
4452
process.on 'SIGINT', ->
4553
console.log "\nshutting down servers from SIGINT (Ctrl+C)"
46-
54+
4755
servers.forEach (server) ->
4856
server.close()
4957

0 commit comments

Comments
 (0)