Clickbank security script

Discussion in 'ClickBank' started by John M, Jul 11, 2007.

  1. #1
    John M, Jul 11, 2007 IP
  2. B.V.E.

    B.V.E. Peon

    Messages:
    106
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I've written the following small code for ASP.NET servers. As you can see it's basically the same as the PHP script, except for some different syntax:

    
    [B]Using:[/B] ASP.NET // VB.Net
    
    [B]FUNCTION:[/B]
    Function cbValid() As Boolean
    	Dim CBSecretKey As String = "YOUR SECRET KEY"
    	Dim rcpt As String = Request.QueryString("cbreceipt")
    	Dim cbtime As String = Request.QueryString("time")
    	Dim item As String = Request.QueryString("item")
    	Dim cbpop As String = Request.QueryString("cbpop")
    	
    	Dim xxpop As String = CBSecretKey & "|" & rcpt & "|" & cbtime & "|" & item
    	xxpop = FormsAuthentication.HashPasswordForStoringInConfigFile(xxpop, "sha1")
    	xxpop = xxpop.ToUpper.Substring(0, 8)
    
    	Return (xxpop = cbpop)
    End Function
    
    [B]USAGE:[/B]
        If cbValid() Then
    	'OK-Validated
            Response.WriteFile("path-of-file-to-display.htm")
        Else
    	'Error:
            Response.Write("<b>Error:</b> Unable to verify your purchase - Please contact the owner of this site if you're convinced you made a legitimate purchase.")
        End If
    
    Code (markup):
     
    B.V.E., Jul 16, 2007 IP
  3. John M

    John M Peon

    Messages:
    153
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Great thanks.

    Do i place it on the thanks page?

    Whats exactly does the script do?
    What happens if some guy copy the url of the thanks page just right after an purchase and sends it to someone else via msn for example? Will they be able to download my product then?
     
    John M, Jul 21, 2007 IP
  4. B.V.E.

    B.V.E. Peon

    Messages:
    106
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It works exactly the same as the CB script and it only validates the purchase details, so yep, someone could unfortunately still copy the entire url...
    You might want to take a look at the DLGuard software if you really want to secure your members area or thank-you page to the max. It has a build-in option which allows customers to only download the product for a specific number of hours after purchase. Requires PHP+MySQL, but it works like charm..
     
    B.V.E., Jul 23, 2007 IP
  5. LucidPlan

    LucidPlan Guest

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'll play the devils advocate here because I've never understood why would anyone want to bother protecting their download page.

    The only place it sounds like a good idea is in robots.txt where you would hide the dir the file and download page are located in.

    Otherwise, if what you produce in the end makes any bit of an inconvencie for your customers, it makes zero sense. It's just a cost of doing business and those who want to pirate your stuff, will find a way.
     
    LucidPlan, Jul 23, 2007 IP
  6. samstephens

    samstephens Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hi all,

    Sorry to dredge up an old thread, I'm just new to this forum.

    This is actually a VERY dangerous thing to do - the problem with doing this is that you're simply telling everyone where to go and download your products from. These files are readable by everyone, not just the search engines.

    You should never put any file or folder that contains sensitive info in your robots file.

    I 100% agree with this - if you choose a good download management system you will actually find that by using the system, not only are you making your products and website more secure, but you're also making life for your customers easier.

    I'm actually the owner of DLGuard, and clients of mine have had their customers tell them what a smooth transaction it is.

    I think all security measures should be taken as long as they don't negatively impact your valid customers.

    And if the security system actually makes things EASIER for your customer, such as DLGuard can, then even better!

    cheers
    Sam

    PS. Remember: listing sensitive info in robots.txt files is bad :)
     
    samstephens, Aug 27, 2007 IP
  7. MattyD

    MattyD Peon

    Messages:
    126
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Hey Sam!

    Welcome to the forums :)

    DLGuard is awesome! Best piece of software that I've ever bought. Used it for a couple of years and it has paid for itself many times over.

    Which reminds me, I need to reply to your email with regards to that query I had.
     
    MattyD, Aug 27, 2007 IP
  8. samstephens

    samstephens Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Thanks Matty, great to be here :)

    And I'm really glad you're getting a lot out of DLGuard!

    Thanks for your support!

    cheers
    Sam
     
    samstephens, Sep 3, 2007 IP