Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
BoLaMN committed Dec 22, 2019
1 parent 26ef36d commit 841507d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dist/http/cwmp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ response = function(res) {
'SOAPServer': 'ACSServer'
};
code = 404;
data = null;
if (res.name && (methods[res.name] != null)) {
if (res.id == null) {
res.id = '1690d26c77f0000';
Expand All @@ -103,14 +104,13 @@ response = function(res) {
}
} else if (finished) {
code = 204;
data = null;
headers['Connection'] = "close";
headers['Content-Length'] = 0;
console.log('<<< EMPTY RESPONSE');
console.dir([headers, data]);
}
console.dir([code, headers, data]);
res.writeHead(code, headers);
return res.end(data);
res.end(data);
};

module.exports = function(url) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tch-exploit",
"version": "2.0.0-rc2",
"version": "2.0.0-rc3",
"main": "dist/index.js",
"bin": "dist/index.js",
"scripts": {
Expand Down
7 changes: 5 additions & 2 deletions src/http/cwmp/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ response = (res) ->
'SOAPServer' : 'ACSServer'

code = 404
data = null

if res.name and methods[res.name]?
res.id ?= '1690d26c77f0000'
Expand All @@ -98,17 +99,19 @@ response = (res) ->

else if finished
code = 204
data = null

headers['Connection'] = "close"
headers['Content-Length'] = 0

console.log '<<< EMPTY RESPONSE'
console.dir [ headers, data ]

console.dir [ code, headers, data ]

res.writeHead code, headers
res.end data

return

module.exports = (url) ->
(req, res) ->
COOKIE_REGEX = /\s*([a-zA-Z0-9\-_]+?)\s*=\s*"?([a-zA-Z0-9\-_]*?)"?\s*(,|;|$)/g
Expand Down

0 comments on commit 841507d

Please sign in to comment.