Skip to content

Commit decfb1f

Browse files
committed
indent
1 parent 2206a91 commit decfb1f

File tree

5 files changed

+19
-15
lines changed

5 files changed

+19
-15
lines changed

dist/http/cwmp/index.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ response = function(res) {
100100
headers['Content-Length'] = data.length;
101101
if (res.name === 'cwmp:TransferCompleteResponse') {
102102
finished = true;
103-
} else if (!finished) {
104-
code = 204;
105-
data = null;
106-
headers['Connection'] = "close";
107-
headers['Content-Length'] = 0;
108-
console.log('<<< EMPTY RESPONSE');
109-
console.dir([headers, data]);
110103
}
104+
} else if (!finished) {
105+
code = 204;
106+
data = null;
107+
headers['Connection'] = "close";
108+
headers['Content-Length'] = 0;
109+
console.log('<<< EMPTY RESPONSE');
110+
console.dir([headers, data]);
111111
}
112112
res.writeHead(code, headers);
113113
return res.end(data);

dist/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ if (args.dhcponly) {
2020
dhcpd(ip, args.acsurl, args.acspass);
2121
} else {
2222
ask(ip).then(port).then(function(p) {
23+
console.log("listening for cwmp requests at http://" + ip + ":" + p + "/");
2324
dhcpd(ip, args.acsurl || ("http://" + ip + ":" + p + "/"), args.acspass);
2425
return httpd(ip, p);
2526
});

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.0-b3",
3+
"version": "2.0.0-b4",
44
"main": "dist/index.js",
55
"bin": "dist/index.js",
66
"scripts": {

src/http/cwmp/index.coffee

+8-7
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,16 @@ response = (res) ->
9595

9696
if res.name is 'cwmp:TransferCompleteResponse'
9797
finished = true
98-
else if not finished
99-
code = 204
100-
data = null
10198

102-
headers['Connection'] = "close"
103-
headers['Content-Length'] = 0
99+
else if not finished
100+
code = 204
101+
data = null
104102

105-
console.log '<<< EMPTY RESPONSE'
106-
console.dir [ headers, data ]
103+
headers['Connection'] = "close"
104+
headers['Content-Length'] = 0
105+
106+
console.log '<<< EMPTY RESPONSE'
107+
console.dir [ headers, data ]
107108

108109
res.writeHead code, headers
109110
res.end data

src/index.coffee

+2
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,7 @@ else
2626
ask ip
2727
.then port
2828
.then (p) ->
29+
console.log "listening for cwmp requests at http://#{ ip }:#{ p }/"
30+
2931
dhcpd ip, args.acsurl or "http://#{ ip }:#{ p }/", args.acspass
3032
httpd ip, p

0 commit comments

Comments
 (0)