After The Whiz had left the company, The System fell into Mortimer's coworker's lap. Amongst countless other things, one thing that he was having such a hard time figuring out was the significance of the mysterious numbers 22, 7, -12, and 620 strewn throughout the code. Then he found this. Amidst 1600 lines VBScript order validation/processing code. With not a single line containing anything even resembling a function or subroutine.
'ED: Yes, these are the original comments ... ' This code will calculate order total, mask it, and send it to ' the ThankYou.asp page, where it will then be unmasked to reveal ' its true beauty, just like the poor Phantom of the Opera. Randomize amount = oTotal maskerLeft = Int((999999 - 100000 + 1) * Rnd + 100000) maskerRight = Int((999999 - 100000 + 1) * Rnd + 100000) ' this will be used as a dummy, to throw off the wise ' it calculates nothing maskerDummyLeft = Int((999999 - 100000 + 1) * Rnd + 100000) maskerDummyRight = Int((999999 - 100000 + 1) * Rnd + 100000) maskerDummyMid = Int((999999 - 100000 + 1) * Rnd + 100000) maskerDummy = maskerDummyLeft & maskerDummyMid & ".50" & maskerDummyRight ' takes order total and jumbles it mathematically maskerAmount = ((((oTotal + 22) * 7 )) - 12) * 620 ' adds random numbers to the left and right of amount ' this var is sent to ThankYou.asp track = maskerLeft & maskerAmount & maskerRight ' ED: Snip Response.Redirect("ThankYou.asp?ft=" & form_type & "&tempid=" & tNumber
& "&track=" & track & "&tot=" & maskerDummy)
[Advertisement]
BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!