New BOINC server build, new scripts, lots of fun!!

Posted: June 29, 2014 in Ideas, IT, Linux, Networking

Monitorix
It’s been a while… but I’ve been crazy busy lately. But here’s my new server build 🙂

So first off, I learned how to use wget to download a password protected (read: authentication required) file on a remote server. It’s actually much easier than I anticipated and only took around 15 minutes to figure out. Here’s the jist…

wget --load-cookies cookie.txt \ -p http://webpage.com/that/requires/password

Essentially, what I did here was use Chrome and the free extension “cookie.txt export” found here.

If you tried to wget a page that required authentication without having authentication, you’ll usually end up pulling either an error page from the site or the site’s login page.

So the way around this is pretty simple. I just logged into the website in question and used the Chrome extension above to export the login cookie into a text file. I then used SCP to load the file onto the server (which just dropped it in the user’s home directory) and pointed wget to it with the –load-cookies switch. What this does it give wget the authority to properly and fully access the site I want to grab. 🙂 Perfect!

I actually used this in a script which emails me (using the same script I wrote for a tutorial last year, also available on this blog) a couple times a day with information about my BOINC server and it’s progress in crunching my data. Here’s one of the files that gets attached (and is the result of the above script) which tells me everything I need to know at a quick glance, whether at home or on the go (mobile).

So as you can see, this simple scripting trick can prove VERY useful.

More details regarding the server build soon!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s