Skip to content

Commit

Permalink
Merge pull request SECFORCE#15 from xCh12i5/ContentType-Fix
Browse files Browse the repository at this point in the history
Solves ContentType issue in webshells.
  • Loading branch information
nvssks authored Jan 19, 2019
2 parents fce0488 + b3256b7 commit e6ce578
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions webshells/conn.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ if (Request.Url.Query.StartsWith("?proxy")){ //XXX:Stupid hack but works
return;
}
}
else{
else{
Socket socket = Session["socket"] as Socket;
//Read data from request and write to socket
Expand All @@ -189,7 +189,7 @@ if (Request.Url.Query.StartsWith("?proxy")){ //XXX:Stupid hack but works
//Welcome to C trim
byte[] received = new byte[bytesRead];
Array.Copy(receiveBuffer, received , bytesRead);
Response.ContentType = "application/octet-stream";
Response.BinaryWrite(received);
}
else {
Expand Down
4 changes: 2 additions & 2 deletions webshells/conn.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ if(request.getParameter("proxy") == "" ){
return;
}
else{
response.setContentType("application/oclet-stream");
response.setContentType("application/octet-stream");
//Allocate buffers for socket IO
ByteBuffer dataIn = ByteBuffer.allocate(bufferSize);
ByteBuffer dataIn = ByteBuffer.allocate(bufferSize);
ByteBuffer dataOut = ByteBuffer.allocate(bufferSize);
try{
Expand Down

0 comments on commit e6ce578

Please sign in to comment.