commit b90c201d52ccf7a5524e66f2c8516dab345707f2 Author: Administrator Date: Tue Mar 10 07:22:52 2026 +0100 Create Version 1.0 diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..7ef3155 --- /dev/null +++ b/README.txt @@ -0,0 +1 @@ +Modern UI with edited Paths for the Reverse Proxy. diff --git a/achg.asp b/achg.asp new file mode 100644 index 0000000..0429d5c --- /dev/null +++ b/achg.asp @@ -0,0 +1,145 @@ +<%@Language="VBScript"%> + + +<% +On Error goto 0 +If Request.Form("cancel") <> "" Then + If Request.Form("denyifcancel") <> "" Then + Response.Status = "401 Unauthorized" + Response.End + Else + Response.Redirect(Request.QueryString) + End If + Response.End +End If + +If Request.Form("new") <> Request.Form("new2") Then + Call ShowResult(L_PWDM_Text, "error") + Response.End +End If + +On Error Resume Next +dim domain, posbs, posat, username, pUser, root +dim upn_name +upn_name = "" + +domain = Trim(Request.Form("domain")) +if domain = "" then + posbs = Instr(1,Request.Form("acct"),"\") + posat = Instr(1,Request.Form("acct"),"@") + if posbs > 0 then + domain = Left(Request.Form("acct"),posbs-1) + username = Right(Request.Form("acct"),len(Request.Form("acct")) - posbs) + elseif posat > 0 then + upn_name = Request.Form("acct") + domain = Right(upn_name, len(upn_name) - posat) + username = Left(upn_name, posat-1) + else + username = Request.Form("acct") + set nw = Server.CreateObject("WScript.Network") + domain = nw.Computername + end if +else + username = Trim(Request.Form("acct")) +end if + +if IsInvalidUsername(username) = true then + Call ShowResult(L_InvalidUsername_Text & ".", "error") + Response.End +end if + +if IsInvalidDomainname(domain) = true then + Call ShowResult(L_InvalidDomainname_Text & ".", "error") + Response.End +end if + +if upn_name = "" then + set pUser = GetObject("WinNT://" & domain & "/" & username & ",user") + if Not IsObject(pUser) then + set root = GetObject("WinNT:") + set pUser = root.OpenDSObject("WinNT://" & domain & "/" & username & ",user", username, Request.Form("old"),1) + end if + if Not IsObject(pUser) then + set pUser = Server.CreateObject("IIS.PwdChg") + pUser.Domain = domain + pUser.User = username + end if +else + set pUser = Server.CreateObject("IIS.PwdChg") + if Not IsObject(pUser) then + set pUser = GetObject("WinNT://" & domain & "/" & username & ",user") + if Not IsObject(pUser) then + set root = GetObject("WinNT:") + set pUser = root.OpenDSObject("WinNT://" & domain & "/" & username & ",user", username, Request.Form("old"),1) + end if + else + pUser.Domain = domain + pUser.User = username + pUser.UPN = upn_name + end if +end if + +if Not IsObject(pUser) then + if err.number = -2147024843 then + Call ShowResult(L_NotExist_Text & ".", "error") + else + if err.description <> "" then + Call ShowResult(L_Error_Text & ": " & err.description, "error") + else + Call ShowResult(L_Errornumber_Text & ": " & err.number, "error") + end if + end if + Response.End +end if + +err.Clear +pUser.ChangePassword Request.Form("old"), Request.Form("new") + +if err.number <> 0 then + if err.number = -2147024810 then + Call ShowResult(L_Error_Text & ": " & L_Invalid_Text, "error") + elseif err.number = -2147022651 then + Call ShowResult(L_PasswordToShort_Text, "error") + else + Call ShowResult(L_Errornumber_Text & ": " & err.number, "error") + end if + Response.End +else + Call ShowResult(L_PasswordChanged_Text & ".", "success") + Response.End +end if + +Sub ShowResult(msg, cls) + Dim subtitle + If cls = "success" Then + subtitle = "Die Aenderung wurde vom Active Directory bestaetigt." + Else + subtitle = "Die Aenderung konnte nicht abgeschlossen werden." + End If + Call RenderPageStart("Kennwort aendern", subtitle) +%> +
<%=Server.HTMLEncode(msg)%>
+
+ Zurueck zum Formular + <% If cls = "success" Then %> + Fertig + <% End If %> +
+<% + Call RenderPageEnd() +End Sub + +function IsInvalidUsername(username) + dim re + set re = new RegExp + re.Pattern = "[/\\""\[\]:<>\+=;,@]" + IsInvalidUsername = re.Test(username) +end function + +function IsInvalidDomainname(domainname) + dim re + set re = new RegExp + re.Pattern = "[/\\""\[\]:<>\+=;,@!#$%^&\(\)\{\}\|~]" + IsInvalidDomainName = re.Test(domainname) +end function +%> diff --git a/aexp.asp b/aexp.asp new file mode 100644 index 0000000..56c2da8 --- /dev/null +++ b/aexp.asp @@ -0,0 +1,81 @@ +<%@Language="VBSCRIPT"%> + + + +<%=L_Title_Text%> + + + + + + + + + + + + + +<%if Instr(1,Request.ServerVariables("SERVER_SOFTWARE"), "IIS") > 0 then%> + + + + + + +
<%=L_ISM_Text%>
<%=L_IIS6_Text%>
+<%end if%> + + +<%if Instr(1,Request.ServerVariables("SERVER_SOFTWARE"), "PWS") then%> + + + + + + +
<%=L_ISM_Text%>
<%=L_PWS_Text%>
+<%end if%> + +

+<% +'W3CRYPTCAPABLE corresponds to HTTP_CFG_ENC_CAPS. +'Tells us that the server if SecureBindings are set +if Request.ServerVariables("HTTP_CFG_ENC_CAPS") <> 1 then%> + <%=L_PasswordExpired_Text%>.

+ <%=L_SSL1_Text%>.

+ <%=L_SSL2_Text%>.

+ /"><%=L_DefDoc_Text%> <%=L_OrOther_Text%>. + <%Response.End%> +<%end if%> + +<%=L_PasswordExpired_Text%>. <%=L_ChangeNow_Text%>.

+ +

/iisadmpwd/achg.asp?<%=Server.HTMLEncode(Request.QueryString)%>"> + + + + + + + + + + + + + + +
<%=L_Account_Text%>">
<%=L_OldPassword_Text%>
<%=L_NewPassword_Text%>
<%=L_Confirm_Text%>
+ +

+ + + + + + +

+ + diff --git a/aexp2.asp b/aexp2.asp new file mode 100644 index 0000000..9647def --- /dev/null +++ b/aexp2.asp @@ -0,0 +1,87 @@ +<%@Language="VBSCRIPT"%> + + + + + +<%=L_Title_Text%> + + + + + + + + + + + +<%On Error goto 0%> +<%if Request.Form("cancel") <> "" then + if Request.Form("denyifcancel") <> "" then + Response.Status = "401 Unauthorized" + Response.End + else + Response.Redirect(Request.QueryString) + end if + Response.End +end if +%> + + +<%if Instr(1,Request.ServerVariables("SERVER_SOFTWARE"), "IIS") > 0 then%> + + + + + + +
<%=L_ISM_Text%>
<%=L_IIS6_Text%>
+<%end if%> + + +<%if Instr(1,Request.ServerVariables("SERVER_SOFTWARE"), "PWS") then%> + + + + + + +
<%=L_ISM_Text%>
<%=L_PWS_Text%>
+<%end if%> + +

+ +

/iisadmpwd/achg.asp?<%=Server.HTMLEncode(Request.QueryString)%>"> + + + + + + + + + + + + + + +
<%=L_Account_Text%> "" then%> + <%=Server.HTMLEncode(Request.Form("acct"))%> +<%else%> + <%=Server.HTMLEncode(Request.ServerVariables("REMOTE_USER"))%> +<%end if%>">
<%=L_OldPassword_Text%>
<%=L_NewPassword_Text%>
<%=L_Confirm_Text%>
+ +

+ + + + + +

+ + + diff --git a/aexp2b.asp b/aexp2b.asp new file mode 100644 index 0000000..0a50b8b --- /dev/null +++ b/aexp2b.asp @@ -0,0 +1,117 @@ +<%@Language="VBSCRIPT"%> + + + + + +<%=L_Title_Text%> + + + + + + + + + + + + +<% +On Error goto 0 +if Request.Form("cancel") <> "" then + Response.Redirect(Request.QueryString) +end if + + dim domain, username, posbs, posat + + username = Request.Form("acct") + if username <> "" then + username = Server.HTMLEncode(username) + else + username = Server.HTMLEncode(Request.ServerVariables("REMOTE_USER")) + end if + + domain = Request.Form("domain") + if domain <> "" then + domain = Server.HTMLEncode(domain) + else + posbs = Instr(1, username, "\") + posat = Instr(1, username, "@") + if posbs > 0 then + domain = Left(username, posbs - 1) + username = Right(username, len(username) - posbs) + elseif posat > 0 then + domain = Right(username, len(username) - posat) + username = Left(username, posat - 1) + else + set nw = Server.CreateObject("WScript.Network") + domain = nw.UserDomain + end if + end if + +%> + + + +<%if Instr(1,Request.ServerVariables("SERVER_SOFTWARE"), "IIS") > 0 then%> + + + + + + +
<%=L_ISM_Text%>
<%=L_IIS6_Text%>
+<%end if%> + + +<%if Instr(1,Request.ServerVariables("SERVER_SOFTWARE"), "PWS") then%> + + + + + + +
<%=L_ISM_Text%>
<%=L_PWS_Text%>
+<%end if%> + +

+ +

/iisadmpwd/achg.asp?<%=Server.HTMLEncode(Request.QueryString)%>"> + + + + + + + + + + + + + + + + + +
<%=L_Domain_Text%>
<%=L_Account_Text%>
<%=L_OldPassword_Text%>
<%=L_NewPassword_Text%>
<%=L_Confirm_Text%>
+ +

+ + + + + +

+ + diff --git a/aexp3.asp b/aexp3.asp new file mode 100644 index 0000000..9bd9921 --- /dev/null +++ b/aexp3.asp @@ -0,0 +1,72 @@ +<%@Language="VBSCRIPT"%> + + + +<%=L_Title_Text%> + + + + + + + + + + + + + +<%if Instr(1,Request.ServerVariables("SERVER_SOFTWARE"), "IIS") > 0 then%> + + + + + + +
<%=L_ISM_Text%>
<%=L_IIS6_Text%>
+<%end if%> + + +<%if Instr(1,Request.ServerVariables("SERVER_SOFTWARE"), "PWS") then%> + + + + + + +
<%=L_ISM_Text%>
<%=L_PWS_Text%>
+<%end if%> + +

+ +<%=L_PasswordExpired_Text%>. <%=L_ChangeNow_Text%>.

+ +

/iisadmpwd/achg.asp?<%=Server.HTMLEncode(Request.QueryString)%>"> + + + + + + + + + + + + + + +
<%=L_Account_Text%>">
<%=L_OldPassword_Text%>
<%=L_NewPassword_Text%>
<%=L_Confirm_Text%>
+ +

+ + + + + + +

+ + + diff --git a/aexp4.asp b/aexp4.asp new file mode 100644 index 0000000..f384b48 --- /dev/null +++ b/aexp4.asp @@ -0,0 +1,84 @@ +<%@Language = "VBSCRIPT"%> + + + +<%=L_Title_Text%> + + + + + + + + + + + + +<%On Error goto 0%> +<%if Request.Form("cancel") <> "" then + if Request.Form("denyifcancel") <> "" then + Response.Status = "401 Unauthorized" + Response.End + else + Response.Redirect(Request.QueryString) + end if + Response.End +end if +%> + + +<%if Instr(1,Request.ServerVariables("SERVER_SOFTWARE"), "IIS") > 0 then%> + + + + + + +
<%=L_ISM_Text%>
<%=L_IIS6_Text%>
+<%end if%> + + +<%if Instr(1,Request.ServerVariables("SERVER_SOFTWARE"), "PWS") then%> + + + + + + +
<%=L_ISM_Text%>
<%=L_PWS_Text%>
+<%end if%> + +

+ +

/iisadmpwd/achg.asp?<%=Server.HTMLEncode(Request.QueryString)%>"> + + + + + + + + + + + + + +
<%=L_Account_Text%> "" then%> + <%=Server.HTMLEncode(Request.Form("acct"))%> +<%else%> + <%=Server.HTMLEncode(Request.ServerVariables("REMOTE_USER"))%> +<%end if%>">
<%=L_OldPassword_Text%>
<%=L_NewPassword_Text%>
<%=L_Confirm_Text%>
+ +

+ + + + + +

+ + diff --git a/aexp4b.asp b/aexp4b.asp new file mode 100644 index 0000000..4d59102 --- /dev/null +++ b/aexp4b.asp @@ -0,0 +1,63 @@ +<%@Language="VBScript"%> + + +<% +On Error goto 0 +If Request.Form("cancel") <> "" Then + Response.Redirect(Request.QueryString) + Response.End +End If + +Dim domain, username, posbs, posat +username = Request.Form("acct") +If username <> "" Then + username = Server.HTMLEncode(username) +Else + username = Server.HTMLEncode(Request.ServerVariables("REMOTE_USER")) +End If + +domain = Request.Form("domain") +If domain <> "" Then + domain = Server.HTMLEncode(domain) +Else + posbs = Instr(1, username, "\\") + posat = Instr(1, username, "@") + If posbs > 0 Then + domain = Left(username, posbs - 1) + username = Right(username, len(username) - posbs) + ElseIf posat > 0 Then + domain = Right(username, len(username) - posat) + username = Left(username, posat - 1) + Else + Set nw = Server.CreateObject("WScript.Network") + domain = nw.UserDomain + End If +End If + +Call RenderPageStart("Kennwort aendern", "Bitte gib dein aktuelles Kennwort und das neue Kennwort ein.") +%> +
+
+ + + + + + + + + + + + + + +
+ +
+ + + +
+
+<% Call RenderPageEnd() %> diff --git a/anot.asp b/anot.asp new file mode 100644 index 0000000..82b89c3 --- /dev/null +++ b/anot.asp @@ -0,0 +1,73 @@ +<%@Language = "VBSCRIPT"%> + +<%on error resume next%> + + + + +<%=L_Title_Text%> + + + + + + + + + + + + + +<%if Instr(1,Request.ServerVariables("SERVER_SOFTWARE"), "IIS") > 0 then%> + + + + + + +
<%=L_ISM_Text%>
<%=L_IIS6_Text%>
+<%end if%> + + +<%if Instr(1,Request.ServerVariables("SERVER_SOFTWARE"), "PWS") then%> + + + + + + +
<%=L_ISM_Text%>
<%=L_PWS_Text%>
+<%end if%> + + + + +

+ +<%=L_PwdSoon_Text%>.

+ +

+ + + + +<%if Request.ServerVariables("HTTP_CFG_ENC_CAPS") <> 1 then%> + <%=L_SSL1_Text%>.

+ <%=L_SSL2_Text%>.

+ +<%else%> + + <%=L_ChangePwd_Text%>

+ + "> + + + +<%end if%> + +

+ +/"><%=L_DefDoc_Text%> <%=L_OrOther_Text%>. + diff --git a/anot3.asp b/anot3.asp new file mode 100644 index 0000000..d50a73e --- /dev/null +++ b/anot3.asp @@ -0,0 +1,58 @@ +<%@Language="VBSCRIPT"%> +<%on error resume next%> + + + +<%=L_Title_Text%> + + + + + + + + + + + + + +<%if Instr(1,Request.ServerVariables("SERVER_SOFTWARE"), "IIS") > 0 then%> + + + + + + +
<%=L_ISM_Text%>
<%=L_IIS6_Text%>
+<%end if%> + + +<%if Instr(1,Request.ServerVariables("SERVER_SOFTWARE"), "PWS") then%> + + + + + + +
<%=L_ISM_Text%>
<%=L_PWS_Text%>
+<%end if%> + + +

+ +<%=L_PwdSoon_Text%>.

+ +

+ +<%=L_ChangePwd_Text%>?

+ +"> + + + +

+
+ + diff --git a/iispwchg.dll b/iispwchg.dll new file mode 100644 index 0000000..27a2a0f Binary files /dev/null and b/iispwchg.dll differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..bcefb71 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/text.asp b/text.asp new file mode 100644 index 0000000..ce22fc2 --- /dev/null +++ b/text.asp @@ -0,0 +1,34 @@ +<% +const L_Title_Text = "IIS - Authentication Manager" +const L_ISM_Text = "Internet Service Manager" +const L_IIS6_Text = "for Internet Information Server 6.0" +const L_PWS_Text = "for Peer Web Services" +const L_PwdSoon_Text = "Your password will expire soon" +const L_ChangePwd_Text = "Do you want to change it now?" +const L_SSL1_Text = "A secure channel ( SSL or PCT ) is necessary in order to change a password" +const L_SSL2_Text = "SSL/PCT is not installed/enabled on your system, please install it to enable this functionality" +const L_PasswordExpired_Text = "Your password has expired" +const L_DefDoc_Text = "Access default document" +const L_OrOther_Text = "or select another document" +const L_ChangeNow_Text = "You can change it now" +const L_Account_Text = "Account" +const L_Domain_Text = "Domain" +const L_OldPassword_Text = "Old password" +const L_NewPassword_Text = "New password" +const L_Confirm_Text = "Confirm new password" +const L_OK_Text = " OK " +const L_Cancel_Text = " Cancel " +const L_Reset_Text = " Reset " + +const L_PasswordChanged_Text = "Password successfully changed" +const L_Back_Text = "Back" +const L_BackTo_Text = "Back to " +const L_PasswordToShort_Text = "Either the password is too short or password uniqueness restrictions have not been met." +const L_Invalid_Text = "Invalid username or password" +const L_Error_Text = "Error" +const L_Errornumber_Text = "Error number" +const L_NotExist_Text = "The specified domain or account did not exist" +const L_InvalidUsername_Text = "The specified username contains invalid characters" +const L_InvalidDomainname_Text = "The specified domain name contains invalid characters" +const L_PWDM_Text = "Passwords don't match" +%> diff --git a/ui.asp b/ui.asp new file mode 100644 index 0000000..46256f4 --- /dev/null +++ b/ui.asp @@ -0,0 +1,67 @@ +<% +Sub RenderPageStart(pageTitle, pageSubtitle) +%> + + + + + +<%=pageTitle%> + + + +
+
+
+

<%=pageTitle%>

+

<%=pageSubtitle%>

+
+
+<% +End Sub + +Sub RenderPageEnd() +%> + +
+
+
+ + +<% +End Sub +%>