Where I Have Been

Well, I am used to, at the very least, posting at least one blog post or one article a week on the main site, on average it is a couple blog posts and one article. However, after the attacks on the site, which I am still recovering from (why the comments on the blog right now still aren’t fixed, i just haven’t had the time with preparing for SPC and at the NOSC lately at work I have been bogged down), I just haven’t been motivated lately to put out any new content, unfortunately.

I understand that I got nailed by these idiots because the site I run deals with security, however usually, when I was pulling such bullcrap when I was younger, I usually targeted sites that weren’t strictly about posting information, but were mostly around selling security products. I guess what goes around comes around, and now I am paying for it in spades.

On the good end, I will be making a couple adjustments to the site as a whole.

1) I am going to be moving most likely to a new hosting provider. I am not sure whether I am up for the challenge of moving off Apache, however I am looking at Orcs Web since the offer hosting to MVP’s

2) I have been putting off the site redesign for about two months now. I have it in staging at home, however I just haven’t made the effort to put it into effect since if I move to a new hosting provider I most likely am going to move over to ASP.NET from PHP. I am hesitant on that move for the sole fact that I find PHP more attractive as an external scripting language for its ease of use and quick scripting abilities, however I suppose it makes all around sense to do it. My only other issue with it is I have to right an HTTP module to handle dead link redirection from people linking into the site, so I have to figure out some way to translate the Apache mod_rewrite dictionary files into some sort of translation library to redirect users.

3) I most likely will upgrade my blog software, I am using WordPress right now, however Andrew Connell continually raves about SubText so maybe I will give that a whirl.

That’s about all I have planned. As I count the blog posts that I have in the que and finished right now, I am looking at nine. You can expect this out as soon as I put together an intermediate patch for the comments error.

Stay Tuned!

Share

CAPTCHA WebPart for Blogs

So I have been working on a freeware CAPTCHA WebPart for a while, and it has been going pretty well, well kind of. For those that are unfamiliar with the technology, CATPCHA stands for Completely Automated Public Turing test to tell Computers and Humans Apart and is mainly meant for combating mass postings of meaningless bullcrap by bots and spammers who detract from the good nature of us bloggers. For a more detailed explanation of what CAPTCHA is, for once Wikipdeia has an accurate post, which can be found here.

I am making my CAPTCHA WebPart a segment of something I am calling the SharePoint Bot and Spam Protector (SBSP) package that although includes just CAPTCHA functionality currently. Right now the functionality is:

Numeric Length Property
Numbers or Letters
Image Format
CAPTCHA Style

Which as you can tell is all tailored around CATPCHA. However, I plan on extending this a little bit further to include code for:

Akismet (http://akismet.com/) – I am adding this because I think that the service is generally good. I am working out a deal with the company so that I can get the API keys that are required taken care of, which as far as I can tell from my conversations with them requires me to maintain a database of registered users. Since I don’t really think that it is necessary for people to register for my site, it would probably be beneficial to instead register for something like the SharePoint Community Portal. I am going to ask my MVP community about possibly having that hosted there instead.

(DUPM)Did you pass math? – This is just basic challenge / response protocol. Some people prefer it over using CAPTCHA images, which is fine depending on your preference. Some people prefer to use both which is acceptable as well.

Comment Timeout – This is probably, although it is not currently, going to natively be built in with the properties of whatever verification format that you use. The benefit of this is that older posts will automatically have their comments disabled. It just makes sense to do it this way. It is just a way to auto-close comments for posts that meet a certain criteria, in this case a time argument. It is somewhat common in most blog software.
All of the current, and the future stuff talked about, will be controllable through the WebPart properties (which is why in the screenshot you see the option to “display the CAPTCHA image”, which wouldn’t make much sense otherwise for the other spam/bot options like challenge/response math!).

(Yeah I know I spelled CAPTCHA wrong in some of the properties. Whoops!)

I got a bunch of the image types written (styles you can choose from for you CAPTCHA image), and I really have to admit that although the System.Drawing namespace and System.Drawing.2D namespace are quite powerful, I wanted to shove a pen in my eye when getting it to write out stuff appropriately (just the different CAPTCHA types). Ok, maybe its not that bad, but I really miss design surfaces when doing WebParts still (I know about the SmartPart etc., but I like native programming) particuarlly because I am not artist (it took me two months to design sharepointsecurity.com). You have to use System.Drawing.Graphics to make a an image object using FromImage with its desintation parameter, then go through all the attributes and properties to make the image pretty like the SmoothingMode, etc. Then getting the image out is just connecting the relevant lines and curves with things like GraphicsPath. To randomly generate the image, I iterate through a string of garabage text that randomly selects a set of numbers, then this class is consumed by the textual output display.
Once I figure out how to deploy the damn thing, I will be releasing it for testers.

Share