Tracing Email Sending PHP Scripts On Servers

It happens sometimes, a server you are responsible for seems to be sending out spammy emails, and its normally caused by legacy or insecure code. The mail log indicates there are plenty of potential spam messages going out that are originating locally but most Linux servers host a lot of sites. So the question then becomes, how do I find the script thats responsible for sending all of the emails? […]

By |July 9th, 2013|Linux, PHP|0 Comments

A Quick Look At Animate.css

I was browsing github today when I came across the very interesting Animate.css repository. Animate.css provides a bunch of cool cross browser CSS3 based ¬†animations under an MIT licence that you can use in your own projects with minimal effort. First things first you need to get a copy and depending how you want to use it, you can either build a custom package here, that only contains the effects you are after (hover over the text titles to see each effect in action!). Or if size isn’t an issue and you just want to play around simply clone a copy of the complete code base from github repository. From here its pretty easy to get started, just include the Animate.css style sheet into your page and then add the desired classes to your elements as you require. Below I have created a basic html document to demonstrate a provided “hinge” effect on an element containing some text. The Animate.css style sheet has simply been added in the head of the document. I am also loading jQuery so that when a visitor clicks the hingeElement the animate and hinge classes are then dynamically added to the element: […]

By |July 3rd, 2013|CSS, web development|0 Comments

Command Line Tips: Program Execution

Executing commands is an integral part of using any Linux system. To follow up on my post about navigating file systems from the command line ( Linux Tips: File & Directory Handling ) more effectively, I am I have picked up over the years. Discovering What Shell You Are In Finding exactly out what shell you are currently using in a terminal can be determined using a variety of different techniques. Some of which are: Using the ps command to display the name of the shell process ( $ is a shell variable that reflects the pid of the current shell ). ps -o command $$ You can echo the $0 variable which will display the name of the shell script. echo $0 Or you can also echo the $SHELL environment variable which will display your shell script echo $SHELL […]

By |July 2nd, 2013|Linux|0 Comments

Linux Tips: File & Directory Handling

My desktop and all of the servers I own are Linux or Unix based. So as a result I tend to find myself in a terminal navigating file systems and working with files more often than not. Command line file management allows you to wield crazy amounts of power but it doesn’t have to be all hard work. Here I am going to run you through some of my favorite simple file and directory related tips for working at the command line. […]

By |June 25th, 2013|Linux|0 Comments

Deleting all mail for a local server account

It happens, cron jobs can and will go wrong occasionally and when they do, they love to send alerts to the job's owner hoping for a little attention. An alias can always be added to the /etc/alias file directing all of the mail for an address to to /dev/null but most of the time thats [...]

By |June 17th, 2013|Linux|0 Comments

Nginx: Locking Down The WordPress Backend By IP Address

I recently looked at the server logs for a new site that had just launched and noticed alot of hits by random IP addresses being made to the WordPress login script. Similar to the excerpt below: 182.18.209.4 – – [10/Jun/2013:07:33:26 -0400] “POST /wp-login.php HTTP/1.1” 200 4807 “drinknycity.com/wp-login.php” “Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0” 200.75.126.115 – – [10/Jun/2013:07:36:29 -0400] “POST /wp-login.php HTTP/1.0” 200 4749 “drinknycity.com/wp-login.php” “Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0” 190.37.99.209 – – [10/Jun/2013:07:43:00 -0400] “POST /wp-login.php HTTP/1.0” 200 4749 “drinknycity.com/wp-login.php” “Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0” 85.105.213.253 – – [10/Jun/2013:07:47:18 -0400] “POST /wp-login.php HTTP/1.0” 200 4749 “drinknycity.com/wp-login.php” “Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0” 123.21.234.227 – – [10/Jun/2013:08:06:45 -0400] “POST /wp-login.php HTTP/1.0” 200 4749 “drinknycity.com/wp-login.php” “Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0” 190.26.124.56 – – [10/Jun/2013:08:10:43 -0400] “POST /wp-login.php HTTP/1.0” 200 4749 “drinknycity.com/wp-login.php” “Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0” Without installing a dedicated plugin to log more details about the requests on the page. At a glance, it appears that automated bots are trying to brute force access to the WordPress backend of the site. If you are like me you most likely only need to access the back end of your WordPress sites from a couple of networks. So I am going to run through the process of locking down access by IP address to wp-login.php under nginx. […]

By |June 11th, 2013|Linux, Security, Wordpress|0 Comments

Changing the web root of a cPanel acccount

As a rule I try to avoid cPanel for hosting sites, I find the overhead of the control panel and the limited flexibility too confining for all but the simplest of sites. Occasionally though I need to deploy sites at work though to cPanel servers due to client requirements. The default web location ( ~/public_html ) for an account works well in most instances. But this default can cause issues when deploying certain applications such as Zend Framework. in which you do not want the web server serving the root of application codebase as the site root. […]

By |April 23rd, 2013|Linux, Sysadmin|0 Comments

S3 Video 0.97 Released

A new version of the S3 Video (0.97) Wordpress plugin has been released to the plugin repository. This release is a combination of some new functionality along with a number of bug fixes. Some of the bigger changes in this release are: Support for Amazon S3 prefixes. This feature allows faster traversal of buckets containing [...]

By |April 10th, 2013|Wordpress|0 Comments

Filling device storage with HTML5 localstorage

A while back I wrote about using HTML5 local storage engine for storing websites data locally on a client device for caching or off line use. The W3 recommendation on web storage recommends a size limit on the amount of data storage allowed per origin. This has currently been implemented by the major browsers as follows: 2.5 MB per origin in Google Chrome 5 MB per origin in Mozilla Firefox, Safari and Opera 10 MB per origin in Internet Explorer […]

By |March 1st, 2013|HTML5, Security|0 Comments

Speeding Up Google SDK Manager Downloads

I have been doing some work developing Android applications with Phonegap over the last few weeks. Getting the Eclipse and ADT is always a breeze. Downloading the required Android SDK libraries using SDK manager is always a pain though the speeds seem to be terrible, with the required time to get a new set of libraries often being over a couple of hours. After much pain and suffering i learn’t it doesnt have to be this way though! […]

By |January 25th, 2013|Android, Mobile Development, Programming|0 Comments