May
22
XKPasswd.pm becomes Crypt::HSXKPasswd
Filed Under Computers & Tech, Software Development, Security, My Projects on May 22, 2015 | 2 Comments
It’s been a while since I released a new version of XKPasswd.pm
, the open source Perl module that powers the secure memorable password generator at www.xkpasswd.net. The main reason for the big gap is that I needed to learn some new skills to get the code to where I wanted it to be. There were three main problems I wanted solved:
- To get wide adoption, the Module needs to be available via CPAN
- The module needs unicode support to deal with non-English languages
- It needs to be easy to edit and tweak a config with the www.xkpasswd.net web interface, and then use it in your scripts.
While solving those problems, I also took the opportunity to tidy up some other odds and ends in the code base. It’s not that code was broken, it just that a few parts of it had a bit of a fishy smell – it seemed like there was probably a better way to do that, and there was!
So, here’s a summary of what’s changed from the the point of view of a user of the Module:
- The Packaging – the module has a new name, and is now packaged with
Module::Build
, so it’s easier to install, and ready for distribution via CPAN. - Unicode Support – if it’s a unicode character, you can use it while generating passwords.
- Redesigned Word Sources – more bundled with the module, and easier to create your own.
- Redesigned Sources of Randomness – more bundled with the module, a better default, and easier to create you own.
- A switch to Named Arguments (in both the constructor and functional interface).
I’ve put a lot of time and effort into developing this entirely free and open source module. If you find it useful, please consider making a donation:
*Download Beta of Crypt::HSXKPasswd
via GitHub*
May
9
TTT Part 34 of n – Introducing HTTP
Filed Under Computers & Tech, Software Development, System Administration on May 9, 2015 | 2 Comments
In the previous instalment we finished a five-part series on SSH. Before moving on, lets take a moment to step back and look at the big-picture. The five SSH instalments are all part of the now long-running series on networking. We have been working our way through the networking stack since instalment 23. We started at the bottom of the stack, and have worked our way up. We are not exploring protocols in the Application Layer.
In this instalment we’re moving on from SSH to HTTP, the protocol that powers the world wide web.
Before we look at some HTTP-related terminal commands, we need a basic understanding of how HTTP works, so that’s what this instalment is all about.
Dec
12
Announcing SubnetCalc.it (and bartificer.ip.js)
Filed Under System Administration, My Projects, Software Development, Computers & Tech on December 12, 2014 | 3 Comments
I’ve not been happy with any of the free subnet calculators I’ve found online, and that came to a head when I was looking for something I could feel happy recommending within the Taming the Terminal series. The great thing about being able to code is that you can scratch your own itch!
The calculator I’ve written is primarily designed around expanding out the network information users will find in the Windows Control Panel, OS X System Preferences, or from terminal commands like ipconfig
(Windows) and ifconfig
(Linux, Unix, OS X). It’s not realistic to expect users to convert netmasks from one notation to another, so the calculator is very liberal in the netmasks it accepts.
The secondary audience for the calculator is students and anyone else interested in understanding the math behind IP subnets. To that end there is button that will expand the interface out to show the binary calculations being carried out under the hood.
Check it out at: www.SubnetCalc.it
This is a very new site, so I’m definitely open to constructive criticism, but please bear in mind the target audience is home users, not IT Pros, so I’m going to be very reluctant to follow through with any suggestions to add more complication to the interface.
I started this project by developing a set of JavaScript classes for representing and manipulating IP addresses, Netmasks, and IP Subnets. I’ve released that library under a BSD license over on my GitHub page – bartificer.ip.js
.
Nov
9
Why I’m No Longer Recommending FileZilla or SourceForge
Filed Under Software Development, Computers & Tech on November 9, 2014 | 2 Comments
I haven’t been a full-time Windows user in a long time, but I do have to use it from time-to-time, and I am often asked for recommendations for nerdier software like FTP clients by Windows users. For many years my stock answer was the same, if you’re on Windows and you need a free FTP client, get FileZilla. This week that advice bit me, and the person I gave it to, in the backside badly.
FileZilla’s project page directs people to a .exe
installer hosted on SourceForge. Trusting that I would not recommend malicious software, the person who asked my advice downloaded the installer without reading the fine print and installed FileZilla – they got a lot more than they bargained for! That .exe
installer did do what you would expect, and installed FileZilla, but it did more than that, it hijacked their browser and installed adware. Suddenly they were getting popups with ads telling them they could optimise their PC, and websites which don’t host ads suddenly started to contain ads!
Sep
30
OS X Service for Markdown Link Creation
Filed Under Computers & Tech, Software Development on September 30, 2014 | Leave a Comment
At the request of listeners I’m going to be publishing a big list of links with future Let’s Talk Apple shows. The logical format for me to create those notes in is Markdown – it’s plain text, and quick and easy for me to add new items and re-arrange them into logical groupings. for the most part markdown has little to no overhead, but when it comes to links there is a little work. What I wanted was a way of automatically taking a URL, and turning it into a markdown link where the text for the link is the site the story is from with /… after it.
When all is done I want to turn a url like http://www.macobserver.com/tmo/article/every-important-link-from-apples-9-9-event-on-one-page
into a link that looks like: www.macobserver.com/…. In other words, I need to take the URL above as input, and turn it into the following Markdown code:
[www.macobserver.com/...](http://www.macobserver.com/tmo/article/every-important-link-from-apples-9-9-event-on-one-page)
My reason for choosing this format is that I want to give obvious credit to the sources of the stories, but not waste screen real-estate on long URLs.
Perl’s URI module can interpret URLs, and easily extract the host part of the URL, OS X Services can take selected text as input and replace it with processed output, Automator can create OS X Services, and Automator can execute Perl code. By putting all these pieces together I was able to solve my problem in just 20 minutes with a few clicks and a few lines of code.
You can just download the service with the link below, or you can read on to see how it’s done.
Download OS X Service …
Aug
30
Play a Sound in Automator
Filed Under Computers & Tech, Software Development, System Administration on August 30, 2014 | 3 Comments
In a recent Chit Chat Across the Pond segment on episode 484 of the Nosillacast Mac Podcast myself and Allison walked through the process of creating an automator action for generating secure memorable passwords with the XKPasswd 2 perl module (we basically walked through the steps in this blog post). During that discussion Allison mentioned it would nice if Automator could play a sound when it was finished so you could know when automator was done generating the password without installing a third-party notification app like Growl.
At the time I didn’t know of a way to do that, but now I do, and it’s really quite straightforward thanks to the OS X terminal command afplay
which will play an audio file without opening any sort of GUI.
Aug
16
XKPasswd 2 – An Absolute Beginner’s Guide
Filed Under Software Development, Computers & Tech on August 16, 2014 | 2 Comments
I’ve just released version two of the XKPasswd perl module, the module that powers the www.xkpasswd.net website. At the moment, only the module has been updated, not the website. It’s going to take me a few months to make all the changes I want to on that site. In the mean time you, can use the module directly. The prerequisites are that you have a computer with Perl and GIT installed, and a plain text editor (no difficult on Linux or Mac).
Aug
13
Announcing XKPasswd.pm 2
Filed Under Computers & Tech, Software Development, Security, My Projects on August 13, 2014 | Leave a Comment
It’s hard to believe, but it’s been nearly three years since I released my first attempt at a Perl library for generating secure memorable passwords. The original spark of inspiration came when Steve Gibson released and talked about his Password Haystacks page at around the same time as the now famous correct horse battery staple XKCD comic was released. Take the idea of using words as the basis for passwords from XKCD, add computers to introduce real randomness (we humans are terrible at being random), and season with come well-chosen and intuitively placed symbols and digits to increase the size of your haystack, and voila, passwords are are both human-friendly and secure!
The first version of the library worked, as evidenced by it’s years of service powering www.xkpasswd.net. That’s not a bad start. But, it was a first attempt at solving the problem, and, I was still a Perl padawan back then. Some of my early design decisions resulted in a less than ideal API making the library a lot less developer-friendly than it could have been, and I’ve learned a lot about Perl, and Perl best practices since 2011!
I’ve spent the past half year or so re-implementing the same basic idea from scratch. In terms of functionality very little has changed, there are a few additions, but the big change is in the API. Basically, the old API was a mess – you needed one config hashref to instantiate the object, then a different config hashref to call the password generation function. Nonsense! That’s not intuitive, not obvious, and not efficient! The new API allows you to achieve the same result with less code, and the code you will have will be easier to read and understand.
You’ll find the project page for the new library at the link below – this page provides links for downloading the code, and links to the module’s very detailed documentation.
This module is provided entirely for free, but has taken a considerable amount of time and effort to write, and continues to take time to develop and maintain. Please consider making a small contribution towards the time I dedicate to this project.
XKPasswd 2 Project Page (http://bartb.ie/xkpasswd)
Jun
21
Computer Programming – A 40k Foot View
Filed Under Computers & Tech, Software Development on June 21, 2014 | 4 Comments
This blog post is a companion document to two Chit Chat Across the Pond segments I will be recording with Allison Sheridan on the NosillaCast over the next two weeks. The first of the two shows is now out, and and can be found here. One the second show is out I’ll add that link in too.
In episode 474 when Allison was chatting with Donal Burr about Apple’s new Swift programming language said she didn’t understand what a compiler was, so I thought it might be fun to try address that! But rather than focus in on just that one very specific question, I thought it would be more useful to take a high-level look at computer programming in general, so that some of the conversations around various developer platforms will make more sense to the majority of NosillaCast listeners, who are non-programers.
May
12
XKPasswd 2.0 – Want to Watch the Sausage get Made?
Filed Under Software Development, My Projects, Computers & Tech on May 12, 2014 | 5 Comments
I’m betting most people won’t be interested in this, but if anyone’s curious how this programmer goes about building up a perl module from scratch, you can watch along on as I build XKPasswd 2.0 over on GITHub: github.com/bbusschots/xkpasswd.pm.
I’m re-implementing XKPasswd from scratch. The resulting functionality will be mostly the same, but with some additions. The reason for starting over is two-fold. Firstly, the first implementation of XKPasswd was very much a prototype, and as with any prototype, I learned some valuable lessons, and there are lots of things I’d do differently if I was doing it again. Secondly, the first version of XKPasswd is almost three years old now, and since then, my Perl skills have increased a lot. Probably the single biggest difference between the me of 2014 and the me of 2011 is that I read Perl Best Practices, and started to run all my Perl code through Perl Critic. Another big difference is that, thanks to JQuery, I’ve fallen in love with Code References in all the languages I use that support them, including Perl.
Since this is a re-write, I’m really focusing on building a solid foundation, so I’m starting with the utility functions that will let me build up functionality gradually, and I’m writing the user documentation in parallel with the code. Before every commit to GITHub, everything that’s done so far is getting documented with POD, and, the code has to pass Perl Critic with no warnings.