Real Estate Internet Marketing

Wordpress Security Woes

Posted by John Lockwood on August 12th, 2008

A few days ago all of the Wordpress sites I have hosted on this server were hacked, so I’ve been learning more than I ever wanted to know about Wordpress security. 

Fortunately I didn’t lose any data, but it was still an almost two-day pain in the butt to get back to an unhacked state.  After seeing what became of many of my files and database entries, I was a bit amazed that Wordpress is as insecure as it is.

Several articles go into the sorts of hacks I was dealing with, where PHP code disguised as image files are added to the list of active plugins.  Yuck.

Probably the most helpful article was Did Your Site Get Hacked.  Why, yes it did.  You might also consult Wordpress Security Notes.

If you simply must see the glass as half full, one of the good things that came out of this was that I have now hardened both my own blogs and those of the clients who are hosted with my blog on my server, and at the same time in order to make maintenance less of a nightmare I’ve consolidated several just-sitting-there blogs into my more popular blogs.

Oh well, into each life must fall not just rain, but two days of useless software development aimed at thwarting some malicious moron with a copied exploit script.

Posted in Blogging, Software | 1 Comment »

Internets 2.0

Posted by John Lockwood on August 24th, 2006

I’m pleased to report that ParticleWave today became fully Internets 2.0 compliant. Flickr has more about this.

I thought this would also be a good time to do my post-mortem on my first three-week iteration of LeadReply, which you might call iterations 1.0, given our naming convention. Actually in looking over the Software Requirements Specification (SRS), it looks as though iteration 1.0 is not quite mortem yet, since there’s one feature missing — Realtor® notification. That should probably be what I tackle today and tomorrow, even though by rights it’s OK since Eudora’s handling it for now.

The main thing is that in iteration one, we combined an autoresponder with an automatic data entry system into a system that can grow into a full fledged contact manager or drip marketing system. The SQL Server database design is pretty complete — what gets tricky now is that we’re actually entering clients and leads into production, so modifications to the schema become a bit more involved from here on out. Fortunately most of the changes we need now are additional stored procedures, so dropping all / creating all should still work fine in that realm.

Iteration one was a good brush up / learning vehicle for more SQL and SQL Server stored procedures than we’d done in many a month, so from the project portfolio aspect it was a good success. I also got to bang out some good ADO.NET code in C Sharp — not rocket science, to be sure, but some HR guy is bound to expect that it is, so now I can say, “sure, I’ve done that”, since he’ll never be able to figure out that I could based on how similar it is to everything else in the universe.

It might be worth getting with IHomefinder or Moineau Designs or the like at this point to see if there’s any demand for an IDX lead parser and autoresponder, since that’s what we’ve got at the end of iteration 1.

All in all I think being where I am at this stage is pretty good given some of the distractions that came up this week such as some existing web site work and a bit of direct client work as well. The web site, LeadReply.com, is almost utterly nowhere yet — but that’s exactly where it’s supposed to be at this point, with most of the work on the lead parser and database.

Built into the SRS was that each iteration should have a go / no go decision about the next iteration. I’m leaning toward “go” at the moment but will formalize that into the SRS. If we go ahead, some priorities are:

  • Write and test the campaign scheduler for sending out emails after the first “one-off” welcome email.
  • Write a parameterizable opt-in form that can be included on third party sites (e.g. MY third Internets 2.0 enabled third party sites ).
  • Write the corresponding one-click opt-out form, where the default result is “opted out”, but in case the user made a mistake, let them opt back in.

That’s a bit different focus than the first version of the SRS, so I should get this merged into that and do a bit more planning.

As always, what should the business be doing is the harder question than what should the software be doing.

Posted in Random Particles, Software, Web Site Promotion | Add a comment »

Subversion for Windows, etc.

Posted by John Lockwood on July 29th, 2006

Well, it’s Saturday morning, and what better time to extend one’s programming skills. Get 2/3 of a night’s sleep on Friday night, and wake up before the sun to write some Transact SQL for the realcrm project I’m working on, and along the way go install and start using Subversion for Windows.

Now that was just a pleasure. Install the thing, restart 4NT, read for 10 to 20 minutes, and hey, I’m checking things out and committing and gosh knows what. The only thing remotely like a hickup was the error message that I needed to set $SVN_EDITOR, so I added that to my 4NT startup batch file and away I went. Just what I wanted, version control for use on my personal products that runs fine from the command line and costs what I wanted to pay for version control for my personal projects, i.e., nothing. Of course, if you must use a GUI instead of a command prompt, and if talk of 4NT has you scratching your head, then check out Tortoise SVN, which integrates SVN into Windows Exploder. But don’t ask me whether that part works or not.

[C:\] Real men use the command prompt.

</geek>

A bit later, I’m going to go into my realcrm project and Frozzle the Sub Space Winch. I’ve been thinking that it needed a good Frozzling — just been waiting to have a 32-bit left handed frozzler to do it.

Maybe I should have gone for 3/3 of a night’s sleep.

Posted in Random Particles, Software | Add a comment »

Great SQL Server Site

Posted by John Lockwood on July 14th, 2006

I was just doing a bit of SQL Server hacking this evening to brush up my skills in that area, and I happened across this outstanding SQL Server Site that I thought I’d mention.

Suddenly I’m jonesing for yet another web site host, where I can play around with some .NET and SQL server application development. Meantime, the real estate sites are split between two separate hosts already, so I’m a bit hesitant in that regard, but at least one of the SQL Team authors gave Orcs Web a fairly glowing writeup.

Posted in Software | Add a comment »

More C# Exam Samples

Posted by John Lockwood on July 9th, 2006

I’ve uploaded the latest Sample Code for Exam 70-536. This batch includes the ICollection etc. samples posted last time as well as a few halting forays into ConfigurationManager — there’s more to do in that section, to be sure.

I’m not very happy with how the code formatting is going given the layout of the Particlewave site. I just don’t have enough room between the navigation and the right hand links to get a decent line of code in, it seems. We’ll have to look into that further, or give up the idea of blogging about code — I don’t like the latter alternative at all.

Posted in Software | Add a comment »

ICollection, IEqualityComparer, IComparer Examples

Posted by John Lockwood on July 8th, 2006

Here are the latest 70-536 exam samples. I’ll roll them back into the downloadable version soon.



using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using NUnit.Framework.Tests;
using System.Threading;

namespace ExamSamples.Bullet1
{
    [TestFixture]
    public class NewBullet1Tests
    {
        [Test]
        public void TestICollection()
        {
            ArrayList al = new ArrayList();
            al.Add("Something");
            al.Add("Something Else");

            // ArrayList implements ICollection
            ICollection col = al as ICollection;
            Assert.IsNotNull(col);

            // Iterate in thread safe way using
	    // IColleciton.SyncRoot
            // -- just an example in our case
            try
            {
                Monitor.Enter(col.SyncRoot);
                foreach (String item in al)
                    Assert.AreNotEqual(item, String.Empty);
                // This failed.  ArrayList is not thread safe
                // Assert.IsTrue(col.IsSynchronized);
            }
            finally
            {
                Monitor.Exit(col.SyncRoot);
            }

            Assert.AreEqual(col.Count, 2);
            Assert.IsFalse(col.IsSynchronized);
        }

        [Test]
        public void TestIComparer()
        {
            ArrayList al = new ArrayList();
            al.Add("Something");
            al.Add("Something Else");

            // No, IComparer is used on objects in collections,
            // not collections
            IComparer ic = al as IComparer;
            Assert.IsNull(ic);

            IComparable icomparable = al as IComparable;
            Assert.IsNull(icomparable);

            // Sort some fish (see fish implementation below)
            SortedList sl = new SortedList();

            // Insert in nonsorted order
            sl.Add(new Fish("Fancy Goldfish",
                Fish.Finsize.medium), null);
            sl.Add(new Fish("Angelfish",
                Fish.Finsize.large), null);
            sl.Add(new Fish("Glassfish",
                Fish.Finsize.small), null);

            // Keys are now in sorted order
            Fish f = (Fish)sl.GetKey(0);
            Assert.IsTrue(f.FinSize == Fish.Finsize.small);

            f = (Fish)sl.GetKey(2);
            Assert.IsTrue(f.FinSize == Fish.Finsize.large);
        }

        [Test]
        public void TestIEqualityComparer()
        {
            Cookie c1 = new Cookie();

            Cookie c2 = new Cookie();
            Cookie c3 = new Cookie();

            c1.Name = "Keebler";
            c1.HasChips = true;

            c2.Name = "Swanson";
            c2.HasChips = true;

            c3.Name = "Keebler";
            c3.HasChips = false;

            // We've overriden Object.Equals as well,
            // so this succceeds
            Assert.AreEqual(c1, c3);

            // Here's the IEqualityComparer version
            Assert.IsTrue(c1.Equals(c1, c3));
        }
    }

    public class Fish : IComparer, IComparable
    {
        public enum Finsize { small, medium, large };

        private String _name;

        private Finsize _finsize;

        public Finsize FinSize
        {
            get
            {
                return _finsize;
            }
        }

        public Fish(String name, Finsize size)
        {
            _name = name;
            _finsize = size;
        }

        #region IComparer Members
        public int Compare(object x, object y)
        {
            if (x == null ||
		((Fish)x)._finsize < ((Fish)y)._finsize)
                return -1;

            if (y == null ||
		((Fish)y)._finsize < ((Fish)x)._finsize)
                return 1;

            return 0;
        }
        #endregion

        #region IComparable Members

        public int CompareTo(object obj)
        {
            // This sorts in ascending order
	    // -- small fins first in our case.
            return Compare(this, obj);
        }

        #endregion
    }

    public class Cookie : IEqualityComparer
    {
        private String _name;
        private Boolean _hasChocolateChips;

        public String Name
        {
            get
            {
                return _name;
            }
            set
            {
                _name = value;
            }
        }

        public Boolean HasChips
        {
            get
            {
                return _hasChocolateChips;
            }
            set
            {
                _hasChocolateChips = value;
            }
        }

        // Needed for our test to pass. Probably not for a
	// hashtable.
        // Object.Equals here
        public override bool Equals(object obj)
        {
            return Equals(this, obj);
        }

        // also therefore need to override Object.GetHashCode
        public override int GetHashCode()
        {
            return GetHashCode(this);
        }

        #region IEqualityComparer Members
        public new bool Equals(Object x, Object y)
        {
            Cookie cx = x as Cookie;
            Cookie cy = y as Cookie;
            return (GetHashCode(cx) == cy.GetHashCode(cy));
        }

        public int GetHashCode(object obj)
        {
            Cookie c = obj as Cookie;
            // Easy -- defer to one of our strings
	    // to hash by name of cookie.
            return (c.Name.GetHashCode());
        }
        #endregion
    }
}

Posted in Software | Add a comment »


Subscribe Using RSS