How to encrypt in VBScript using AES?

One way is to declare encryption classes within vbscript, without needing external added COM objects or wrapper. The following example takes a string, encrypts and decrypts using Rijndael managed class: ‘—————————————————– Dim obj,arr,i,r,str,enc,asc dim bytes,bytesd,s,sc,sd set obj=WScript.CreateObject(“System.Security.Cryptography.RijndaelManaged”) Set asc = CreateObject(“System.Text.UTF8Encoding”) s=”This is a private message” bytes=asc.GetBytes_4(s) obj.GenerateKey() obj.GenerateIV() set enc=obj.CreateEncryptor() set dec=obj.CreateDecryptor() bytec=enc.TransformFinalBlock((bytes),0,lenb(bytes)) sc=asc.GetString((bytec)) … Read more

How to resolve “The requested URL was rejected. Please consult with your administrator.” error?

Your http is being blocked by a firewall from F5 Networks called Application Security Manager (ASM). It produces messages like: Please consult with your administrator. Your support ID is: xxxxxxxxxxxx So your application is passing some data that for some reason ASM detects as a threat. Give the support id to your network engineer to … Read more

Querying Active Directory using VBScript

To look at all the members of an OU, try this… Set objOU = GetObject(“LDAP://OU=YourOU,DC=YourDomain,DC=com”) For each objMember in ObjOU ‘ get all the members’ ‘ do something’ Next To do a custom search for DNs try this… set conn = createobject(“ADODB.Connection”) Set iAdRootDSE = GetObject(“LDAP://RootDSE”) strDefaultNamingContext = iAdRootDSE.Get(“defaultNamingContext”) Conn.Provider = “ADsDSOObject” Conn.Open “ADs Provider” … Read more

ADODB.Recordset error ‘800a0bb9’ : Arguments are of the wrong type

The most like cause is that you haven’t included “ADOVBS.INC” or the equavalent META:- <!–METADATA TYPE=”TypeLib” NAME=”Microsoft ActiveX Data Objects 2.6 Library” UUID=”{00000206-0000-0010-8000-00AA006D2EA4}” VERSION=”2.6″ –> Hence the adxxxx constants do not exist. However your primary mistake is not including Option Explicit at the top your script. This will save you bucket loads of time hunting … Read more

How do I properly instantiate 32-bit COM objects in classic ASP after installing Windows Update KB4340558?

We were affected with multiple customers too. I ruled out invalid strong-name signing of our assemblies, since the .NET Assemblies from the Framework itself were affected by that access-denied error too. Finally I managed to solve the issue by configuration. Apparently the authenticating identity of the website has now to match the identity of the … Read more