Hi! I’m Brad!

I’m an award-winning software developer from Laramie, Wyoming.

Category: ASP VBscript

  • Freebie: Handy VBscript Nonce Script

    Here’s a handy snippet to help you keep your VBscript forms secure. (If you’re ever using vbscript for any reason)

    Session("last_nonce") = Session("current_nonce")
    sent = Request.Form("current_nonce")
    valid = Session("last_nonce")
    Session("uwbkst_nonce") = "n"&(Int((max-min+1)*Rnd+min))

    And then, somewhere in your form, include

    <input type="text" name="uwbkst_nonce" value="<%=Session("uwbkst_nonce") %>">

    And then in your form processor file

    <% If sent = valid Then
    ' do something
    End If %>