<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
					xmlns:content="http://purl.org/rss/1.0/modules/content/"
					xmlns:wfw="http://wellformedweb.org/CommentAPI/"
				  >
<channel>
<title>planck's Blog</title>
<link>http://sterlinghamilton.artician.com/</link>
<description><![CDATA[planck's blog on Artician]]></description>
<image><title>planck's Blog</title>
<link>http://sterlinghamilton.artician.com/</link>
<url>http://uc.artician.com/members/1/7/17162/avatar.png</url>
</image>
<language>en-us</language>
<pubDate>Sun, 22 Nov 2009 10:31:29 -0500</pubDate>
<item>
<title>Starting a movement.</title>
<link>http://sterlinghamilton.artician.com/blog/2009/06/starting-a-movement/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/06/starting-a-movement/</guid>
<description><![CDATA[I've decided to turn on advertising for my profile.<br />
I am also a pro user.<br />
I am doing this to further Artician in what very small way I can.<br />
<br />
The advertising doesn't bug me - hell - later when  I customize the page I'll even make a funny about it.<br />
<br />
So anyway - trying to start a movement of people who are pro users and STILL have advertisements on their page.<br />
Why? Because this place is pretty cool and I don't stare at my profile more than 15 minutes a day so I don't really deal with the ads.<br />
<br />
Join the movement! Support Artician! :p<br />
<br />
* Note: before you flame me - this is just me starting a random ass movement. It is in no way going to judge people who do not join <img border="0" alt="Emotion: laugh.gif" style="vertical-align: middle;" src="http://www.artician.com/forum/style_emoticons/default/laugh.gif"/>]]></description>
<pubDate>Tue, 09 Jun 2009 11:49:15 -0400</pubDate>
</item>
<item>
<title>House cleaning!</title>
<link>http://sterlinghamilton.artician.com/blog/2009/06/house-cleaning/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/06/house-cleaning/</guid>
<description><![CDATA[I cleaned out some of my works that I didn't like.<br />
That actually puts me down to 1 web site submission...so I need to fix that.<br />
<br />
I did submit quite a few logos.<br />
They are for myself and they are just my attempts at creating a decent logo.<br />
Half practice - half serious.<br />
<br />
I plan on submitting as much work as possible over the next few weeks.<br />
Comments are appreciated!]]></description>
<pubDate>Mon, 08 Jun 2009 15:59:13 -0400</pubDate>
</item>
<item>
<title>Some New Work and Some New Plans</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/some-new-work-and-some-new-plans/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/some-new-work-and-some-new-plans/</guid>
<description><![CDATA[I have uploaded some new work to my portfolio - so be sure to check it out!<br />
<br />
I am also going to reset my custom layout back to the default one.<br />
I am getting closer to a decent version of my website layout and once I have that completed I will re-customize my profile to match it.<br />
<br />
Thanks to everyone who has been giving me input on my work.<br />
It's extremely appreciated!<br />
<br />
* Also a special thanks to Eric, Henry and Brandon (Artician Developers) who took time to troubleshoot some FireFox, Chrome and Internet Explorer issues I was having with Artician.]]></description>
<pubDate>Fri, 29 May 2009 14:42:23 -0400</pubDate>
</item>
<item>
<title>I've Officially Left deviantArt</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/ive-officially-left-deviantart/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/ive-officially-left-deviantart/</guid>
<description><![CDATA[I have officially left deviantart - see my profile below:<br />
<br />
<a href="http://sterloinmonkeypants.deviantart.com/" target="_blank">http://sterloinmonkeypants.deviantart.com/</a><br />
<br />
I decided to leave it active to drive more people here.<br />
<br />
Thanks to  D.P.Lockheart's work I was able to use that image.<br />
See his work here:<br />
<br />
<a href="http://obliviousdesigns.artician.com/portfolio/Artician-Social-Network-Leave-Button/" target="_blank">http://obliviousdesigns.artician.com/portfolio/Artician-Social-Network-Leave-Button/</a>]]></description>
<pubDate>Wed, 27 May 2009 23:11:41 -0400</pubDate>
</item>
<item>
<title>Related Riddles for your Teetering Bulb of Dread and Dream</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/related-riddles-for-your-teetering-bulb-of-dread-and-dream/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/related-riddles-for-your-teetering-bulb-of-dread-and-dream/</guid>
<description><![CDATA[<div class="quotetop"></div><div class="quotemain">What English word has the letters A - D - A - C consecutivley?</div><br />
<br />
<div class="quotetop"></div><div class="quotemain">What English word begins with the letters H - E and ends with the letters H - E that is not the word &quot;he&quot;?</div><br />
<br />
Some things I figured out pretty quickly.<br />
These were mentioned in a book I am currently reading.<br />
<br />
Gödel, Escher, Bach: An Eternal Golden Braid ( commonly GEB ).<br />
<br />
Enjoy!]]></description>
<pubDate>Tue, 26 May 2009 12:50:20 -0400</pubDate>
</item>
<item>
<title>Profile Design</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/profile-design/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/profile-design/</guid>
<description><![CDATA[Alright - so I did some customizations to my profile and I am happier with it now.<br />
It's simple - I think some of the elements could use some different styles but for now this is good.<br />
Any comments/suggestions are welcome!! <img border="0" alt="Emotion: smile.gif" style="vertical-align: middle;" src="http://www.artician.com/forum/style_emoticons/default/smile.gif"/>]]></description>
<pubDate>Thu, 14 May 2009 17:17:38 -0400</pubDate>
</item>
<item>
<title>Customizing Profile</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/customizing-profile/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/customizing-profile/</guid>
<description><![CDATA[Currently designing and building my new profile look.<br />
So if you visit it and it looks funky...I am probably working on it! <img border="0" alt="Emotion: laugh.gif" style="vertical-align: middle;" src="http://www.artician.com/forum/style_emoticons/default/laugh.gif"/>]]></description>
<pubDate>Thu, 14 May 2009 15:07:19 -0400</pubDate>
</item>
<item>
<title>Website Down</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/website-down/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/website-down/</guid>
<description><![CDATA[I've decided my website needed a facelift.<br />
In order to motivate myself to finishing the new design - I've taken down my old website.<br />
<br />
I am not sure what software I will be using this time.<br />
The last site was using ExpressionEngine.<br />
<br />
I felt that the layout was... &quot;cute&quot; but not really my style and deffinately not up to par skillwise with what I can do.<br />
<br />
So until it's finished it will just have a splash page with a link to here! <img border="0" alt="Emotion: smile.gif" style="vertical-align: middle;" src="http://www.artician.com/forum/style_emoticons/default/smile.gif"/>]]></description>
<pubDate>Thu, 14 May 2009 14:24:01 -0400</pubDate>
</item>
<item>
<title>Monthly Processed E-mail Counter for PHPList</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/monthly-processed-e-mail-counter-for-phplist/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/monthly-processed-e-mail-counter-for-phplist/</guid>
<description><![CDATA[Here’s a little something I wrote at work.<br />
Basically we used to charge per e-mail sent out using PHPList. (We have since then switched to Constant Contact)<br />
When I wrote this we had not been keeping track of who is sending out what and thus we had not been billing accordingly. I decided to fix that!<br />
<br />
So below is a script that will should be called at the beginning of every month.<br />
It will go back to the previous month and grab how many e-mails were sent out from what databases and then e-mail it to our billing department so the client can be billed.<br />
<br />
The only tricky part was the automatic date look up. I hate dates…but I did some simple methods to get around the handicap and now it all works.<br />
<br />
The first charge for the example month is like $420.00 - and that was a slow month. So let’s say that every month gets $350 worth of e-mails…well that’s $4200 a year. I’d actually venture to say that the real number is more along $6000 a year. Score one for Sterling and increased automated income.<br />
<br />
Example Output:<br />
This is an automated message.<br />
Below is a list of all PHPList e-mails that went out for September<br />
<br />
[5040] E-mails for Database: [ahhhmassage_db]<br />
[24103] E-mails for Database: [clarkcountybar_newsletter]<br />
[7978] E-mails for Database: [commacoffee_news]<br />
[11665] E-mails for Database: [mckernan_newsletter]<br />
<br />
See code below:<br />
<br />
<div class="codetop""></div><div class="codemain">#!/usr/bin/php -q<br />
&lt;?php<br />
  /* PHPList  Processed E-mail Counter<br />
   * Author:  Sterling Hamilton<br />
   * Date:    10.08.2008<br />
   *<br />
   * Use from the command line.<br />
   * Example default use:   # php PHPListCounter.php<br />
   *  -&gt; This will count all processed e-mails in the current month for each database.<br />
   */<br />
<br />
  $strMailAddress = &quot;billing@exyst.com&quot;;<br />
  $strSubject = &quot;Monthly PHPList Report&quot;;<br />
  $strMessage = &quot;&quot;;<br />
<br />
  @$cnMain = mysql_connect(&quot;localhost&quot;, &quot;admin&quot;, &quot;MQNIV8OW&quot<img border="0" alt="Emotion: wink.gif" style="vertical-align: middle;" src="http://www.artician.com/forum/style_emoticons/default/wink.gif"/>;<br />
  if (!$cnMain) {<br />
      die(&quot;\033[31mCould not connect\033[0m: &quot;.mysql_error().&quot;\n&quot<img border="0" alt="Emotion: wink.gif" style="vertical-align: middle;" src="http://www.artician.com/forum/style_emoticons/default/wink.gif"/>;<br />
  }<br />
<br />
  $strQuery = &quot;SHOW DATABASES&quot;;<br />
  $aryDatabases = mysql_query($strQuery);<br />
<br />
  $strLastMonthEnd = mktime(0, 0, 0, date('m'), 0, date(&quot;Y&quot<img border="0" alt="Emotion: wink.gif" style="vertical-align: middle;" src="http://www.artician.com/forum/style_emoticons/default/wink.gif"/>);<br />
  $strLastMonthEnd = date('Y-m-d', $strLastMonthEnd);<br />
<br />
  $aryTemp = explode(&quot; &quot;,$strLastMonthEnd);<br />
  $aryDate = explode(&quot;-&quot;,$aryTemp[0]);<br />
<br />
  if($aryDate[1] == 12)<br />
  {<br />
    $strLastMonthEnd = mktime(0, 0, 0, date(&quot;m&quot<img border="0" alt="Emotion: wink.gif" style="vertical-align: middle;" src="http://www.artician.com/forum/style_emoticons/default/wink.gif"/>, 0, date(&quot;Y&quot<img border="0" alt="Emotion: wink.gif" style="vertical-align: middle;" src="http://www.artician.com/forum/style_emoticons/default/wink.gif"/> - 1);<br />
    $strLastMonthEnd = date('Y-m-d', $strLastMonthEnd);<br />
  }<br />
<br />
  $strLastMonthStart = mktime(0, 0, 0, date('m') - 1, 1, date(&quot;Y&quot<img border="0" alt="Emotion: wink.gif" style="vertical-align: middle;" src="http://www.artician.com/forum/style_emoticons/default/wink.gif"/>);<br />
  $strLastMonthStart = date('Y-m-d', $strLastMonthStart);<br />
<br />
  $aryTemp = explode(&quot; &quot;,$strLastMonthStart);<br />
  $aryDate = explode(&quot;-&quot;,$aryTemp[0]);<br />
<br />
  if($aryDate[1] == 12)<br />
  {<br />
    $strLastMonthStart = mktime(0, 0, 0, date(&quot;m&quot<img border="0" alt="Emotion: wink.gif" style="vertical-align: middle;" src="http://www.artician.com/forum/style_emoticons/default/wink.gif"/> - 1, 1, date(&quot;Y&quot<img border="0" alt="Emotion: wink.gif" style="vertical-align: middle;" src="http://www.artician.com/forum/style_emoticons/default/wink.gif"/> - 1);<br />
    $strLastMonthStart = date('Y-m-d', $strLastMonthStart);<br />
  }<br />
<br />
  $strQuery = &quot;SELECT processed FROM `phplist_message` WHERE embargo BETWEEN '$strLastMonthStart' AND '$strLastMonthEnd'&quot;;<br />
<br />
  while ($rowDB = mysql_fetch_assoc($aryDatabases)) {<br />
    $dbCurrent = mysql_select_db($rowDB[&quot;Database&quot;],$cnMain);<br />
    $intCounter = 0;<br />
    $aryCount = mysql_query($strQuery);<br />
    if($aryCount)<br />
    {<br />
      while ($rowCount = mysql_fetch_assoc($aryCount)) {<br />
        $intCounter += ($rowCount[&quot;processed&quot;] &gt; 0) ? $rowCount[&quot;processed&quot;]: 0;<br />
      }<br />
      if($intCounter &gt; 0) {<br />
        $strMessage .= &quot;[$intCounter] E-mails for Database: [&quot;.$rowDB[&quot;Database&quot;].&quot;]\n&quot;;<br />
      }<br />
    }<br />
  }<br />
<br />
  $strHeader = &quot;From: Automated Script  &lt;esupport@exyst.com&gt;\r&quot;;<br />
<br />
  $strMessage = &quot;This is an automated message.\nBelow is a list of all PHPList e-mails that went out for &quot;.date(&quot;F&quot;,mktime(0,0,0, date(&quot;m&quot<img border="0" alt="Emotion: wink.gif" style="vertical-align: middle;" src="http://www.artician.com/forum/style_emoticons/default/wink.gif"/>, 0, date(&quot;Y&quot<img border="0" alt="Emotion: wink.gif" style="vertical-align: middle;" src="http://www.artician.com/forum/style_emoticons/default/wink.gif"/>)).&quot;\n\n&quot;.$strMessage;<br />
<br />
  mail($strMailAddress, $strSubject, $strMessage, $strHeader);<br />
<br />
  mysql_close($cnMain);<br />
?&gt;</div>]]></description>
<pubDate>Wed, 13 May 2009 21:16:10 -0400</pubDate>
</item>
<item>
<title>Using Color Text in Bash Scripts</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/using-color-text-in-bash-scripts/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/using-color-text-in-bash-scripts/</guid>
<description><![CDATA[Need to style some of that text in your bash script?<br />
<br />
Well then use this bad boy:<br />
<br />
<div class="codetop""></div><div class="codemain">!/bin/bash<br />
#<br />
# Example usage:<br />
# echo ${RedF}This text will be red!${Reset}<br />
# echo ${BlueF}{$BoldOn}This will be blue and bold!${BoldOff} - and this is just blue!${Reset}<br />
# echo ${RedB}${BlackF}This has a red background and black font!${Reset}and everything after the reset is normal text!<br />
<br />
Colors() {<br />
  Escape=&quot;\033&quot;;<br />
<br />
  BlackF=&quot;${Escape}[30m&quot;;   RedF=&quot;${Escape}[31m&quot;;   GreenF=&quot;${Escape}[32m&quot;;<br />
  YellowF=&quot;${Escape}[33m&quot;;  BlueF=&quot;${Escape}[34m&quot;;    Purplef=&quot;${Escape}[35m&quot;;<br />
  CyanF=&quot;${Escape}[36m&quot;;    WhiteF=&quot;${Escape}[37m&quot;;<br />
<br />
  BlackB=&quot;${Escape}[40m&quot;;     RedB=&quot;${Escape}[41m&quot;;     GreenB=&quot;${Escape}[42m&quot;;<br />
  YellowB=&quot;${Escape}[43m&quot;;    BlueB=&quot;${Escape}[44m&quot;;    PurpleB=&quot;${Escape}[45m&quot;;<br />
  CyanB=&quot;${Escape}[46m&quot;;      WhiteB=&quot;${Escape}[47m&quot;;<br />
<br />
  BoldOn=&quot;${Escape}[1m&quot;;      BoldOff=&quot;${Escape}[22m&quot;;<br />
  ItalicsOn=&quot;${Escape}[3m&quot;;   ItalicsOff=&quot;${Escape}[23m&quot;;<br />
  UnderlineOn=&quot;${Escape}[4m&quot;;     UnderlineOff=&quot;${Escape}[24m&quot;;<br />
  BlinkOn=&quot;${Escape}[5m&quot;;   BlinkOff=&quot;${Escape}[25m&quot;;<br />
  InvertOn=&quot;${Escape}[7m&quot;;  InvertOff=&quot;${Escape}[27m&quot;;<br />
<br />
  Reset=&quot;${Escape}[0m&quot;;<br />
}<br />
</div>]]></description>
<pubDate>Wed, 13 May 2009 21:03:13 -0400</pubDate>
</item>
<item>
<title>Plesk and the vhost.conf file!</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/plesk-and-the-vhostconf-file/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/plesk-and-the-vhostconf-file/</guid>
<description><![CDATA[So…you’re running Plesk?<br />
Good for you!<br />
<br />
Plesk automatically updates httpd.include for each domain, making changes to this file only temporary. You don’t want to use this file if you need to make changes to Apache’s config on the fly, such as php’s open_basedir values per domain.<br />
<br />
Instead you will want to use a vhost.conf file. This file will be placed inside your domain’s conf directory, usually found at <div class="quotetop"></div><div class="quotemain">/var/www/vhosts/mysite.com/conf</div>.<br />
Create a file called vhost.conf in whatever editor you prefer.<br />
<br />
Note: If you have a site that has an SSL and you need to have access to directories outside the httpsdocs directory you will need to do the same thing but instead of “vhost.conf” it’s “vhost_ssl.conf”<br />
<br />
You can now put in any Apache configuration options like you would into httpd.include.<br />
<br />
Now if you’ve been using Plesk for a bit you know that sites are generally kept under the httpdocs directory.<br />
But let’s say you’re installing some online software…like Sugar CRM, Joomla or ELGG.<br />
<br />
These packages need access to directories outside of the httpdocs directory.<br />
<br />
To solve this issue properly in Plesk - you’re supposed to create a vhost.conf file in the conf directory under your site.<br />
<br />
Let’s say you did this:<br />
<br />
<div class="codetop""></div><div class="codemain">cd /var/www/vhosts/mysite.com<br />
mkdir data<br />
chown myuser:psaserv data</div><br />
<br />
In the site directory you could add the following:<br />
<br />
<div class="codetop""></div><div class="codemain">&lt;Directory /var/www/vhosts/mysite.com/httpdocs/&gt;<br />
php_admin_value open_basedir &quot;/var/www/vhosts/mysite.com/httpdocs:/tmp:/var/www/vhosts/mysite.com/data&quot;<br />
&lt;/Directory&gt;</div><br />
<br />
Then you would need to force an update in Plesk for this domain using the following command:<br />
<br />
<div class="codetop""></div><div class="codemain">/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=mysite.com</div><br />
<br />
After running that there is no need to restart Apache or any other service. Your changes should have taken effect already.]]></description>
<pubDate>Wed, 13 May 2009 20:55:44 -0400</pubDate>
</item>
<item>
<title>Bash Script to Post to Twitter</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/bash-script-to-post-to-twitter/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/bash-script-to-post-to-twitter/</guid>
<description><![CDATA[Here is a quick/easy way to post to twitter from the command line interface.<br />
<br />
<div class="codetop""></div><div class="codemain">#!/bin/bash<br />
<br />
# Login information.<br />
USERNAME=“email address”<br />
PASSWORD=“password”<br />
URL=<a href="http://twitter.com/statuses/update.xml" target="_blank">http://twitter.com/statuses/update.xml</a><br />
<br />
# Check message length.<br />
if [ ! -n “$1” ]; then<br />
      echo “Message not long enough”<br />
      exit<br />
fi<br />
<br />
# Check message length again.<br />
message=”$@”<br />
maxlen=140;<br />
len=`echo $`<br />
<br />
if [ $len -gt $maxlen ]; then<br />
      echo “Your message was longer than 140 characters…”;<br />
fi<br />
<br />
# Post to Twitter.<br />
result=`curl -u $USERNAME:$PASSWORD -d status=”$message” $URL`</div><br />
<br />
Put the script in /usr/local/bin/<br />
Then it is as easy as:<br />
<br />
<div class="codetop""></div><div class="codemain">user@computername:~$ twitter Your Message Here</div>]]></description>
<pubDate>Wed, 13 May 2009 20:53:09 -0400</pubDate>
</item>
<item>
<title>Pimp Slapping your Domain</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/pimp-slapping-your-domain/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/pimp-slapping-your-domain/</guid>
<description><![CDATA[Alright - so let’s bust out the baby powder and get ready to put our Domains in their place!<br />
<br />
Anyone got a website? <b>*raises hand*</b><br />
Anyone have an alias for said website, such as mywebsite.com and mywebsite.net? <b>*keeps hand raised*</b><br />
Anyone feel like letting people stay at the non www versions of these domains or having them stay at .net? <b>*puts hand down*</b><br />
<br />
Alright then!<br />
Let’s begin!<br />
<br />
So basically here’s my situation.<br />
I want to have my domain “sterlinghamilton.com” to be consistent.<br />
So if someone goes to <a href="http://sterlinghamilton.com" target="_blank">http://sterlinghamilton.com</a> it should change to <a href="http://www.sterlinghamilton.com" target="_blank">http://www.sterlinghamilton.com</a> - and if they go to either variation of .net it should go to the .com version!<br />
<br />
Basically…I want my domain rolling on dubs! *laughs to self*<br />
<br />
So how would I do that?<br />
Unfortunately backhanding is not the solution to everything. (Although it does solve a myriad of problems!)<br />
<br />
I think for this issue I will use an .htaccess file!<br />
<br />
Here’s what I am thinking (it’s short and sweet and later if I feel like making it more efficient I will):<br />
<br />
<div class="codetop""></div><div class="codemain">RewriteEngine on<br />
RewriteCond %{HTTP_HOST} ^sterlinghamilton.com<br />
RewriteRule (.*) <a href="http://www.sterlinghamilton.com/$1" target="_blank">http://www.sterlinghamilton.com/$1</a> [R=301,L]<br />
<br />
RewriteCond %{HTTP_HOST} ^sterlinghamilton.net<br />
RewriteRule (.*) <a href="http://www.sterlinghamilton.com/$1" target="_blank">http://www.sterlinghamilton.com/$1</a> [R=301,L]<br />
<br />
RewriteCond %{HTTP_HOST} ^www.sterlinghamilton.net<br />
RewriteRule (.*) <a href="http://www.sterlinghamilton.com/$1" target="_blank">http://www.sterlinghamilton.com/$1</a> [R=301,L] </div><br />
<br />
The first line is allowing us to modify the URL.<br />
The following sets are the rules I wanted to implement.<br />
<br />
If it has a .com but it isn’t rolling on dubs (www) then put dubs on it! <br />
If it has a .net but it isn’t rolling on dubs (www) then put dubs on it! <br />
If it has a .net and it has dubs (www), then make it .com <br />
Simple right?<br />
<br />
That should do it. <b>*quickly tests it so he doesn’t feel stupid*</b><br />
Yes - it works fine.<br />
<br />
That is all!<br />
Good day!]]></description>
<pubDate>Wed, 13 May 2009 20:47:04 -0400</pubDate>
</item>
<item>
<title>X-Cart Security Issue</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/x-cart-security-issue/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/x-cart-security-issue/</guid>
<description><![CDATA[Ugh…I hate security holes.<br />
Got notified of one for X-Cart...had to fix it:<br />
<br />
<div class="quotetop"></div><div class="quotemain">During internal security audit a critical security issue has been detected in X-Cart. The issue makes the software vulnerable to attackers who wish to gain access to the server file system. The solution is to remove an affected file.<br />
<br />
SEVERITY<br />
<br />
Critical<br />
<br />
IMPACT<br />
<br />
A malicious user can execute his own shell commands and, as a result, gain access to the server file system.<br />
<br />
AFFECTED VERSIONS<br />
<br />
X-Cart versions from 4.1.0 to 4.1.11. All X-Cart customers who are using these versions are encouraged to apply the fix described below.<br />
<br />
SOLUTION<br />
<br />
Delete the ‘&lt;xcart_dir&gt;/payment/cc_basia.php’ file.<br />
This file refers to an outdated integration of ‘Bank of Asia’ payment gateway, so its deletion will not cause any problems and will not affect your stores.<br />
The ‘&lt;xcart_dir&gt;’ text means the server directory in which your X-Cart is installed.<br />
You can delete this file using FTP, SSH or the hosting control panel file manager.</div><br />
<br />
Now <b><i>THAT’S</i></b> a good time.<br />
Here’s how I dealt with that:<br />
<br />
Linux command:<br />
<div class="codetop""></div><div class="codemain">locate &quot;/payment/cc_basia.php&quot; &gt; BadFiles</div><br />
<br />
Then I created a script:<br />
<br />
<div class="codetop""></div><div class="codemain">#!/bin/sh<br />
echo &quot;enter file name&quot;<br />
read fname exec&lt;$fname<br />
while read line<br />
do  <br />
echo &quot;rm $&quot;;  <br />
rm $<br />
done</div><br />
<br />
Then ran the following commands:<br />
<br />
<div class="codetop""></div><div class="codemain">sh DeleteFiles.sh<br />
enter file name<br />
BadFiles  </div><br />
<br />
Bad files are gone!<br />
<br />
Woo - done in less than a minute. <b>*blows smoke off fingers*</b><br />
<br />
]]></description>
<pubDate>Wed, 13 May 2009 20:44:48 -0400</pubDate>
</item>
<item>
<title>Finding All Domains In Ensim</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/finding-all-domains-in-ensim/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/finding-all-domains-in-ensim/</guid>
<description><![CDATA[Nifty thing to know.<br />
There is a file in Ensim that keeps track of all domains (aliases included).<br />
It’s generally stored at:<br />
<br />
<div class="quotetop"></div><div class="quotemain">/etc/virtualhosting/mappings/domainmap</div><br />
<br />
That’s nifty if you need to keep track of what’s on the server…or check domain statuses, expiration dates…etc.<br />
<br />
...<br />
<br />
Oh I’m sorry…did I hear someone in the audience say they wanted more?<br />
What’s that you say? You want to grab all the domains from that list? Just the domains? Not the site numbers or anything?<br />
UGH. Fine.<br />
<br />
This command will work fine:<br />
<br />
<div class="codetop""></div><div class="codemain">grep '.'\  /etc/virtualhosting/mappings/domainmap | awk '{print $1}'</div><br />
<br />
Mmmm Grep and Awk…&lt;3<br />
<br />
]]></description>
<pubDate>Wed, 13 May 2009 20:39:37 -0400</pubDate>
</item>
<item>
<title>Finding All Domains In Plesk</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/finding-all-domains-in-plesk/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/finding-all-domains-in-plesk/</guid>
<description><![CDATA[Here's a little &quot;grep-fu&quot; to produce a list of not just primary site domains...but their aliases as well!<br />
<br />
<div class="codetop""></div><div class="codemain">egrep 'Server(Name|Alias)' /var/www/vhosts/*/conf/httpd.include|awk '{print $3}'|grep -v www.*|grep - '^.*\..*\..*$'|sed 's/:80//'|sed 's/:443//'|sort -u</div><br />
<br />
You should be root when running this or you will run into issues.<br />
<br />
Enjoy!<br />
<br />
* Note: the code above may not be showing right...the code tags aren't playing well with my code.<br />
If that's the case - please leave a comment.]]></description>
<pubDate>Wed, 13 May 2009 01:35:35 -0400</pubDate>
</item>
<item>
<title>Plesk Bash Script to turn off Mail Service!</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/plesk-bash-script-to-turn-off-mail-service/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/plesk-bash-script-to-turn-off-mail-service/</guid>
<description><![CDATA[So we have our own mail service here at <a href="http://www.exyst.com">Exyst</a>.<br />
Due to that fact - we do not use Plesk's mail service.<br />
If that mail service is on when we create a site through Plesk, then mail sent by the server isn't handled properly.<br />
This would include contact forms and anything that a Web Application would shoot out.<br />
<br />
Is that a big issue? Yeah...it is.<br />
So I wrote a script that finds all sites that have the service on - and then it turns it off.<br />
<br />
Enjoy:<br />
<br />
<div class="codetop""></div><div class="codemain">#!/bin/bash<br />
<br />
SiteList=`egrep 'Server(Name)' /var/www/vhosts/*/conf/httpd.include|awk '{print $3}'|grep -v www.*|grep -v '^.*\..*\..*$'|sed 's/:80//'|sed 's/:443//'|sort -u`;<br />
<br />
for Site in $SiteList<br />
do<br />
        Result=`/usr/local/psa/bin/domain -i $Site | grep 'Mail service' | awk '{print $3}'`;<br />
        if [ $Result == On ]; then<br />
                Command=`/usr/local/psa/bin/domain -u $Site -mail_service false`<br />
                echo &quot;Turning Off Mail Service: $Site&quot;;<br />
        fi<br />
done</div>]]></description>
<pubDate>Wed, 13 May 2009 01:26:28 -0400</pubDate>
</item>
<item>
<title>Zimbra Mail Quota Bash Script</title>
<link>http://sterlinghamilton.artician.com/blog/2009/05/zimbra-mail-quota-bash-script/</link>
<guid>http://sterlinghamilton.artician.com/blog/2009/05/zimbra-mail-quota-bash-script/</guid>
<description><![CDATA[In an effort to automate some of my daily tasks I decided to write this mail quota monitoring script.<br />
It gets all quota information, processes it, then Twitters the information AND sends an e-mail.<br />
The Twitter information is vague so security isn’t compromised, but the e-mail has the details.<br />
<br />
This way I can get a heads up of impending doom on certain mail accounts!<br />
<br />
Enjoy!<br />
<br />
<div class="codetop""></div><div class="codemain">#!/bin/bash<br />
<br />
# Get the e-mail ready.<br />
Email=&quot;esupport@exyst.com&quot;;<br />
Subject=&quot;Xync: Account(s) Exceeding Quota(s).&quot;<br />
Message=&quot;/tmp/message.txt&quot;<br />
# This starts the message fresh.<br />
echo &quot;Summary:&quot; &gt; $Message<br />
<br />
# Generate data about all mail boxes.<br />
MailBoxQuotaData=`/opt/zimbra/bin/zmprov gqu localhost`;<br />
<br />
# Set counters.<br />
Counter=0;<br />
AccountCounter=0<br />
<br />
# Sort through the data.<br />
for Line in $MailBoxQuotaData<br />
do<br />
        Counter=`expr $Counter + 1`;<br />
        case &quot;$Counter&quot; in<br />
                &quot;1&quot; )<br />
                        Account=$Line<br />
                ;;<br />
                &quot;2&quot; )<br />
                        Limit=$Line<br />
                ;;<br />
                &quot;3&quot; )<br />
                        Used=$Line<br />
                        # If the limit is 0 then it has no limit.<br />
                        if [ &quot;$Limit&quot; -ne &quot;0&quot; ]; then<br />
                                # This produces a whole number we can work with.<br />
                                Percent=$(($Used*100/$Limit))<br />
                                # Notify us if a limit is over 85%.<br />
                                if [ &quot;$Percent&quot; -ge &quot;85&quot;  ]; then<br />
                                        echo &quot;Account: $Account&quot; &gt;&gt; $Message<br />
                                        echo &quot;Quota Percentage: $Percent&quot; &gt;&gt; $Message<br />
                                        AccountCounter=`expr $AccountCounter + 1`<br />
                                fi<br />
                        fi<br />
                        Counter=0<br />
                ;;<br />
        esac<br />
done<br />
<br />
# Send Twitter message.<br />
nice -n 19 /exyst/Twitter.sh &quot;Xync: ${AccountCounter} Accounts Over 85%!&quot;<br />
# Send e=mail.<br />
nice -n 19 /bin/mail -s &quot;$Subject&quot; &quot;$Email&quot; &lt; $Message</div>]]></description>
<pubDate>Tue, 12 May 2009 15:34:07 -0400</pubDate>
</item>
</channel>
</rss>