Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Cookie Debugger - ASP Code Bank


Cookie Debugger
Creates a list of all cookies and there crumbs along with the values assigned to each one.
                
    '**************************************
   Name: Cookie Debugger
   Description:Creates a list of all cookies and there crumbs along with the values assigned to each one.
   
   By: ~~PoD~~(naresh064)
   Returns:Returns an orderd list of names and values of cookies and crumbs.
**************************************
    
    Response.Write CookieData()
    function CookieData()
    	Dim llngMaxCookieIndex
    	Dim llngCookieIndex
    	Dim llngMaxCrumbIndex
    	Dim llngCrumbIndex
    	Dim lstrDebug
    	' Count Cookies
    	llngMaxCookieIndex = Request.Cookies.Count
    	
    	' Let user know if cookies Do Not exist
    	if llngMaxCookieIndex = 0 Then
    		CookieData = "cookie data is empty."
    		Exit function
    	End if
    	
    	' Begin building a list of all cookies
    	lstrDebug = "<OL>"
    	
    	' Loop through Each cookie
    	For llngCookieIndex = 1 To llngMaxCookieIndex
    		lstrDebug = lstrDebug & "<LI>" & Server.HTMLEncode(Request.Cookies.Key(llngCookieIndex))
    		
    		' Count the crumbs
    		llngMaxCrumbIndex = Request.Cookies(llngCookieIndex).Count
    		
    		' if the cookie doesn't have crumbs ...
    		if llngMaxCrumbIndex = 0 Then
    			lstrDebug = lstrDebug & " = "
    			lstrDebug = lstrDebug & Server.HTMLEncode(Request.Cookies.Item(llngCookieIndex))
    		' Else Loop through Each crumb
    		Else
    			lstrDebug = lstrDebug & "<OL>"
    			For llngCrumbIndex = 1 To llngMaxCrumbIndex
    				lstrDebug = lstrDebug & "<LI>"
    				lstrDebug = lstrDebug & Server.HTMLEncode(Request.Cookies(llngCookieIndex).Key(llngCrumbIndex))
    				lstrDebug = lstrDebug & " = "
    				lstrDebug = lstrDebug & Server.HTMLEncode(Request.Cookies(llngCookieIndex)(llngCrumbIndex))
    				lstrDebug = lstrDebug & "</LI>"
    			Next
    			lstrDebug = lstrDebug & "</OL>"
    		End if
    		lstrDebug = lstrDebug & "</LI>"
    	Next
    	lstrDebug = lstrDebug & "</OL>"
    	' Return the data
    	CookieData = lstrDebug
    	
    End function


            
Comments
Sorry but there are no comments to display