File tree 5 files changed +19
-15
lines changed
5 files changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -100,14 +100,14 @@ response = function(res) {
100
100
headers [ 'Content-Length' ] = data . length ;
101
101
if ( res . name === 'cwmp:TransferCompleteResponse' ) {
102
102
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 ] ) ;
110
103
}
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 ] ) ;
111
111
}
112
112
res . writeHead ( code , headers ) ;
113
113
return res . end ( data ) ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ if (args.dhcponly) {
20
20
dhcpd ( ip , args . acsurl , args . acspass ) ;
21
21
} else {
22
22
ask ( ip ) . then ( port ) . then ( function ( p ) {
23
+ console . log ( "listening for cwmp requests at http://" + ip + ":" + p + "/" ) ;
23
24
dhcpd ( ip , args . acsurl || ( "http://" + ip + ":" + p + "/" ) , args . acspass ) ;
24
25
return httpd ( ip , p ) ;
25
26
} ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " tch-exploit" ,
3
- "version" : " 2.0.0-b3 " ,
3
+ "version" : " 2.0.0-b4 " ,
4
4
"main" : " dist/index.js" ,
5
5
"bin" : " dist/index.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -95,15 +95,16 @@ response = (res) ->
95
95
96
96
if res .name is ' cwmp:TransferCompleteResponse'
97
97
finished = true
98
- else if not finished
99
- code = 204
100
- data = null
101
98
102
- headers[' Connection' ] = " close"
103
- headers[' Content-Length' ] = 0
99
+ else if not finished
100
+ code = 204
101
+ data = null
104
102
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 ]
107
108
108
109
res .writeHead code, headers
109
110
res .end data
Original file line number Diff line number Diff line change 26
26
ask ip
27
27
.then port
28
28
.then (p) ->
29
+ console .log " listening for cwmp requests at http://#{ ip } :#{ p } /"
30
+
29
31
dhcpd ip, args .acsurl or " http://#{ ip } :#{ p } /" , args .acspass
30
32
httpd ip, p
You can’t perform that action at this time.
0 commit comments