Skip to content

Instantly share code, notes, and snippets.

@cfalzone
Created November 4, 2015 18:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cfalzone/3df210673f028f97c4bb to your computer and use it in GitHub Desktop.
Save cfalzone/3df210673f028f97c4bb to your computer and use it in GitHub Desktop.
dotCMS JVM Crash Test Dummy - Tests to see if your JVM is susceptible to an SSL crash. Typically if it is you will crash the server after 4075 length. Otherwise if it gets to > 5000 you are most likely safe.
<%@page import="com.dotmarketing.util.Logger"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JVM Crash Test Dummy</title>
</head>
<body>
<%
StringBuffer sb = (StringBuffer) session.getAttribute("string-buffer");
if(null == sb) {
sb = new StringBuffer();
session.setAttribute("string-buffer", sb);
}
sb.append("X");
Logger.info(this, "Buffer length is "+sb.length());
%>
Hello: Length = <%=sb.length()%>
<form action="/jvmCrashTest.jsp" method="post" id="theForm">
<input type="hidden" name="uplinkType" value="rev"/>
<input type="hidden" name="content" value="<%=sb.toString()%>"/>
<input type="submit" value="Send"/>
</form>
<script type="text/javascript"> document.getElementById("theForm").submit(); </script></body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment