<!--- You can change this value to make it more complex --->
<cfset request.Requestedhash = "!!!@$$5656%%00(())">
<!--- You can change this value to make it more complex --->
<cfset request.Requestedhash = "!!!@$$5656%%00(())">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Check for Spam</title>
<cfinclude template="getnew.cfm">
</head>
<body>
<cfif isDefined('form.chk')>
<cfif hash(form.ColorTest & request.Requestedhash) eq form.weightInPounds>
<cfset a = "The Spam test Passed">
<cfelse>
<cfset a = "The Spam test Failed">
</cfif>
</cfif>
<cfform method="post" action="#cgi.SCRIPT_NAME#?#cgi.QUERY_STRING#">
<table width="100%" border="0" cellspacing="2" cellpadding="1">
<cfif isDefined('a')>
<tr><td colspan="2" align="center"><cfoutput><div style="color:red; text-decoration:underline; font-weight:bold;">#a#</div></cfoutput></td></tr>
</cfif>
<tr>
<td align="right">Verify : </td>
<td><cfoutput><strong>#store#</strong>
<cfset saltedValue = Hash(Fix(sum) & request.Requestedhash)>
<input type="hidden" name="weightInPounds" value="#saltedValue#">
</cfoutput></td>
</tr>
<tr>
<td width="25%" align="right">Spam Test : </td>
<td><input type="text" name="ColorTest" id="ColorTest" /></td>
</tr>
<tr>
<td align="right"> </td>
<td><input type="submit" name="chk" id="chk" value="Check For Spam" /><br />
Don not use (-) if the value of the result is in minus</td>
</tr>
</table>
</cfform>
</body>
</html>
<cfset value1 = RandRange(1,10)>
<cfset value2 = RandRange(9,20)>
<cfset randomList = "*|+|-">
<cfset randomInt = randrange(1, listLen(randomList, "|"))>
<cfset id = ListGetAt(randomList, randomInt, "|")>
<cfif value1 LT value2>
<cfset sum = PrecisionEvaluate('#value2##id##value1#')>
<cfset store = value2 & id & value1>
<cfelse>
<cfset sum = PrecisionEvaluate('#value1##id##value2#')>
<cfset store = value1 & id & value2>
</cfif>
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)