<% ' ' Contact your provider for support, NOT flicks software ' http://www.flicks.com/support/ ' http://www.flicks.com/authentix/intro.htm ' You may use this program freely so long as it is in 'conjuction with a product from Flicks Software ' ' Place this file as epoch.asp in a script enabled directory, ' and let Epoch know the URL for this file. ' Make sure that you enable an AuthentiX group for the ' membership directory you want, and make sure this group is the ' same group that Epoch knows about. ' ---------------------------------------------------------------------- ' AuthentiX ASP interface for Epoch ' ' clay@epochsystems.com ' Unfortunately Clay has left Epoch, so getting Windows Server support may now be tough. ' ' When you have installed this script, ' Make sure epoch knows the URL where you have installed it ' Make sure that the group matches the group you have setup in AuthentiX/WebQuota ' Make sure the group -is a permitted group- for your membership directory ' ' Epoch posts the data in the form in a fairly raw format: ' FORM = ADD+KEVIN_GROUP+joel_test+what+test_from_epoch
' So we just get Request.Form ' split it up with Split ' ' 0 arg is command can be 'ADD Command 'CHECK -exists 'DELETED ' ' 1 arg is group ' ' 2 arg is username ' ' 3 arg is password ' ' 4 arg is optional/not used ' ' ---------------------------------------------------------------------- ' change this value if you are using AuthentiX ISP usingAuthentiXStandard = true if (usingAuthentiXStandard) then Set auth = Server.CreateObject("AUTHXOCX.AuthXOCXCtrl.1") else Set auth = Server.CreateObject("AUTHXISP.AuthXOCXCtrl.1") ' use this line to automatically set the domain to be the requesting IP 'protectedDomain = Request.ServerVariables("LOCAL_ADDR") ' use this alternative if you are protecting by host header, ' set protectedDomain to be -your- host header 'protectedDomain = "http://www.xxxvegassexy.com/members" 'auth.SetVirtualDomain protectedDomain, Request.ServerVariables("SCRIPT_NAME") ' check with your isp for your password, initially it is empty 'auth.SetVirtualDomainPassword("") 'end if ' stringToParse = "" ' stringToParse = Request.Form ' stringToParse = "DELETED+12408+joel_test111+what+test_from_epoch" ' stringToParse = "ADD+12408+joel_test111+what+test_from_epoch" ' you can check the incoming remote address with Request.ServerVariables("REMOTE_ADDR") ' Dim parsedString ' parsedString = Split(stringToParse, "+") ' for counter = 0 To UBound(parsedString) ' response.Write(parsedString(counter) & counter) ' Next ' if (2 > UBound(parsedString)) Then ' Response.Write("*failed*

Not enough parameters! 050102") ' response.End ' End if ' action = parsedString(0) ' groupname = parsedString(1) ' username = parsedString(2) 'remoteAddress = Request.ServerVariables("REMOTE_ADDR") 'Set RegularExpressionObject = New RegExp 'With RegularExpressionObject '.Pattern = "^((208.236.105.)|(63.81.1.)|(63.84.23.))" '.IgnoreCase = True '.Global = True 'End With 'expressionmatch = RegularExpressionObject.Test(remoteAddress) 'if ( expressionmatch = FALSE ) then 'response.Write("*failed*

bad IP " & remoteAddress ) 'response.End end if action = Request.Form("command") groupname = Request.Form("ht_file") username = Request.Form("username") password = Request.Form("password") response.Write("

action is " & action & " groupname is " & groupname & " username is " & username & " password is " & password & "

" ) expires = 0 if (isnull(groupname) or (groupname = "")) then response.Write("*failed*

no groupname") response.End end if if (not isnull(action)) then action = trim(ucase(action)) if (username = "") Then Response.Write("*failed*

empty username") elseif (action="ADD" and (password = "" or password="null")) Then Response.Write("*failed*

empty password for ADD") elseif (action = "ADD") Then result = auth.UserAdd(username, password, notes, expires) if ( result <> 0) then %> *failed*

User could not be inserted
username: <%= username %>
password: <%= password %>
result: <%= result %>
<% else if (auth.GroupAddUser(groupname, username) <> 0) then %> *failed*

User could not be inserted to group <%= groupname %>
username: <%= username %>
password: <%= password %>
<% else Response.Write("*success*

ADDED

") end if end if elseif (action = "CHECK") then if (auth.UserLookup(username) = 0) then Response.Write("*success*

FOUND

") else Response.Write("*failed*

NOT_FOUND

") end if elseif (action = "DELETE") then if (auth.UserDelete(username) = 0) then Response.Write("*success*

DELETED

") else Response.Write("*DELETED*") end if elseif (action = "LIST") then i = 0 s = "" Response.Write("

" + chr(13) + chr(10)) for i = 0 to (auth.UserGetCount - 1) s = auth.UserGetAt(i) Response.Write(s) Response.Write(chr(13) + chr(10)) next elseif (action = "VERSION") then Response.Write("<html><body>AuthentiX ASP interface v1.00</body></html>") else Response.Write("<html><body>*failed*<p>no command</body></html>") end if %>