Jump to content
UBot Underground

Cool Little "Download File" Trick


Recommended Posts

Ok, so I have been playing with different ways to backup some of my mysql databases without using cron jobs, etc. So I have a script that backs up a particular database. Just go into UBot, navigate to the url and it backs up. Nice and easy. The problem was that it created the backup in the same directory the script was running from, and I wanted it on my local hard drive. SO...

 

The next logical step was to use the $download file command. It works, but it has those annoying dialog boxes, and I really didn't feel like clicking here, save to there, etc. So it occurred to me...the dialog boxes are part of the browser safety integration (and yes, it makes sense to have it that way)...you can't overcome that, it needs to be there. BUT...we have UBot Studio and UBot Studio doesn't NEED to use a browser, does it?

 

So right after the nav command, I placed a $download file command inside a socket compartment (bypasses the browser) and guess what? VOILA! File is on my hard drive!

 

I hope this is useful for you guys!

 

John

  • Like 1
Link to post
Share on other sites

But John, Sorry I am missing something here, I am a little confused now. Maybe I didn't come across such a case that using $download command popped a file dialog. I thought using the $download file command never pops up a file dialog, so why use socket for it? If I am not wrong, the file dialog will only pop up if you click on the browser to download the file.

Link to post
Share on other sites

If you need to nav directly to the download, OR click a link, you can bypass the dialog with. In my case the $download was producing a dialog (for my .gz file). technically you shouldn't come across many, but if you do...voila!

 

John

Link to post
Share on other sites
  • 3 months later...
  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...