Jul 26, 2019

ColdFusion AdminAPI to Remove Debugging IP Addresses

I just thought I would post a script to remove all the IP addresses inside the ColdFusion Admin.

You will need to change the password.

<cfset    adminObj = createObject("component","cfide.adminapi.administrator") />
<cfset    adminObj.login("YOURPASSWORDHERE") />
<cfset    myObj = createObject("component","cfide.adminapi.debugging") />
<cfset iplist = myObj.getIPList() />
Starting List
<cfdump var="#myObj.getIPList()#" />
<!--- if list is greater than 1 delete all IPs --->
<cfif listlen(iplist) gt 0>
<cfloop list="#iplist#" item="i" >
<cfoutput> Deleting #i#</cfoutput> <br />
<cfset myObj.deleteIP(i) />

Ending List
<cfdump var="#myObj.getIPList()#" />