Skip to content

Instantly share code, notes, and snippets.

@JamoCA
Last active December 21, 2015 12:58
Show Gist options
  • Select an option

  • Save JamoCA/6309128 to your computer and use it in GitHub Desktop.

Select an option

Save JamoCA/6309128 to your computer and use it in GitHub Desktop.
The Project Honey Pot script for ColdFusion was timing out + failing with a "Element EMAIL is undefined in RETURNVARS." error on line 239. (I added a 5 second timeout & 403 error if a "408 Request Timeout" is received.)
<!--- Line 129, change this --->
<cfhttp url="http://#REQUEST_HOST##REQUEST_SCRIPT#" method="POST" port="#REQUEST_PORT#">
<!--- to this (if it takes more than 5 seconds, we will abort) --->
<cfhttp url="http://#REQUEST_HOST##REQUEST_SCRIPT#" method="POST" port="#REQUEST_PORT#" timeout="5">
<!--- After CFHTTP call (around line 144), add this --->
<CFIF Findnocase("408", CFHTTP.StatusCode)>
<cfcontent type="text/html; charset=UTF-8">
<cfheader statuscode="403" statustext="Forbidden">
<CFOUTPUT><h1>Forbidden</h1></CFOUTPUT>
<CFABORT>
</CFIF>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment