GregLedet.net Adventures in networking, security, and other things

29Mar/103

Uploading multiple vCards to Google Contacts

As you can see from my last post, I've been messing around with my contacts list as of late.  I'm trying to get as much info on these people as possible.  Stuff like their birthdays and anniversaries, mailing addresses, emails, phone numbers, etc.  While I'm putting all of this together, I'm also adding pictures for everyone on their vCard; a head shot for friends and the company logo for business contacts.  Since I'm using Outlook 2007 as my main mail program, it's pretty easy to get all of this stuff in one place.  The only problem I was running across was, like I said in the last post, Google was screwing with my contacts list.  First off, you can only import 2 types of files to Google; a vCard file and a CSV.  You can't upload a .pst file which would contain all of my contacts' pictures.  The CSV file does move all the info I want except the pictures, and the vCard file moves everything, but you have to do it one at a time... or do you?

Mr. Barach H. Obama

Click on the business card for the full vCard.

Barack H. Obama Contact in QR Code format

For those of you that don't know what I'm talking about, this is what a Business card vCard looks like in Outlook if I were to email it to you.  It's a .vcf file and contains all kinds of rich information on the back end.  There's a link under the picture for you to download a full vCard for the president.  There's also tons of other formats out there to store your contacts; everything from simple text files all the way to QR codes.  If you have an app on your phone that does 3D barcodes, snap a pic of that one and you'll get the same info that's in the vCard.

Now, back to what I was originally talking about.  Seeing as I want all that rich information in my contacts and I want to import them into Google, I need to use a vCard.  I don't want to have to upload 239 individual files, so this is what I'm going to do.

  1. Go to your contacts in Outlook and highlight them all (ctrl-A). Right click and "Send Full Contact" then "In Internet Format (vCard)".  Depending on how many contacts you have, you may have to split them up into groups.  I did...
  2. An email should pop up with a bunch of attachments.  Send that email to yourself.
  3. From the email you just sent to yourself, highlight all the attachments, right-click, save as. Save them somewhere easy to access.
  4. Open up a command line. (Windows Key + R, then type "cmd" and press OK)
  5. Navigate to the folder where you saved the contacts.  I saved them in C:\contacts, so we'll use that.
  6. The command to type from the directory you have saved your contacts is:
    copy   /B   *.vcf   all_contacts.vcf
  7. This will create a file in that directory called "all_contacts.vcf".  In that file will be the vCards of all of your contacts.
  8. Now you just go to Google.com/contacts, click "Import" on the right side of the page, and upload that file!

It's pretty easy when you think about it.  I don't know of any way to do this from the GUI, so you're going to have to use the command line.  Once you have everything uploaded to Google Contacts, you should be set.  All you pictures and information should have been transferred and now you have a full backup of your contacts list should your computer crash!  I also use the same contacts list on my Windows Mobile phone, so I have multiple backups of my contacts list.  I'll never have to run around trying to rebuild it after losing my phone again!!!

-Greg

26Mar/102

Changing the “file as” format for contacts in Outlook 2007

Today I was working on changing my email server for this domain from being self hosted to being hosted with Google.  In the process of this, I was trying to do too much at once and ended up learning how to do a few things.  First off, you can get push notifications to your Windows Mobile phone from Google.  Go check out Google Sync for your Phone.  Don't worry, I'll be here when you get back...

Now that you're doing that, check this out.  I like my contacts to be listed as "FirstName LastName" or what Microsoft calls the "FullName" file as format.  Google likes to make it's default "LastName, FirstName" and that's where I ran into this problem.  I synced my phone with my computer and in the process got all my contacts and calendar on the phone up to date.  I setup Google Mobile Sync on my phone, which acts exactly like an Exchange Server, and told it to sync Mail, Contacts and Calendar (Tasks doesn't work). I then synced my phone to my new Google account.

Everything looked all hunky-dory, until the next time my phone synced with Google.  While my contacts were on the Google server, it changed my "file as" format!!!  My contacts went in like "Greg Ledet" and came back out "Ledet, Greg".  Needless to say, this pissed me off and I was not going to sleep until I could find a fix.  As you can see, it's 4:24 in the morning right now, so I haven't slept!

I found this post and this post on Google's support site and neither one of those actually gives a proper answer.  It doesn't look like Google plans on fixing this anytime soon, so here's a work around to fix the the format and the way I'm making sure my stuff is up to date.

As it sits, the phone and computer are both using "Lastname, Firstname" and I want those two back to "Firstname Lastname" (FullName).  To do that, open up Outlook and go to your Contacts.  We're going to write some quick VBA code and make a macro to take care of this problem for us.  Follow the steps!

  1. Press Alt+F11 to open the VBA editor. You may have to enable macros (Tools ->Trust Center->Macro Security->Warnings for all macros->OK).
  2. On the left side, you'll see "Project 1" in the top box. Expand the plus next to "Microsoft Office Outlook Objects" and clink on "ThisOutlookSession".
  3. Paste the following code in the "ThisOutlookSession" code box.
  4. Public Sub ChangeFileAs()
     Dim objOL As Outlook.Application
     Dim objNS As Outlook.NameSpace
     Dim objContact As Outlook.ContactItem
     Dim objItems As Outlook.Items
     Dim objContactsFolder As Outlook.MAPIFolder
     Dim obj As Object
     Dim strFirstName As String
     Dim strLastName As String
     Dim strFileAs As String
    
     On Error Resume Next
    
     Set objOL = CreateObject("Outlook.Application")
     Set objNS = objOL.GetNamespace("MAPI")
     Set objContactsFolder = objNS.GetDefaultFolder(olFolderContacts)
     Set objItems = objContactsFolder.Items
    
     For Each obj In objItems
     'Test for contact and not distribution list
     If obj.Class = olContact Then
     Set objContact = obj
    
     With objContact
     ' Uncomment the  strFileAs line for the desired format 
    
     'Lastname, Firstname (Company) format               
     ' strFileAs = .FullNameAndCompany 
    
     'Firstname Lastname format
     ' strFileAs = .FullName
    
     'Lastname, Firstname format
     ' strFileAs = .LastNameAndFirstName
    
     'Company name only
     ' strFileAs = .CompanyName
    
     'Companyname (Lastname, Firstname)
     ' strFileAs = .CompanyAndFullName
    
     .FileAs = strFileAs
    
     .Save
     End With
     End If
    
     Err.Clear
     Next
    
     Set objOL = Nothing
     Set objNS = Nothing
     Set obj = Nothing
     Set objContact = Nothing
     Set objItems = Nothing
     Set objContactsFolder = Nothing
    End Sub
  5. Uncomment the strFileAs line that uses the format you desire before running it. In my case, I want to use the Full Name (FirstName LastName), so I would remove the red apostrophe ' that is in front of the blue strFileAs = .FullName. If you want to use a different format, just remove the apostrophe in front of the format you want to use.
  6. Save the project, click "Run" on the menu bar, and click "Run Sub/UserForm" (or you can just hit F5)
  7. That's it!

Your contacts are now in the "Greg Ledet" order on your computer, but they are still "Ledet, Greg" on your phone and Google.  This is what I've done to things fixed.

  1. On your Windows Mobile phone, open up ActiveSync.
  2. Go to "Menu" then "Options" while in ActiveSync
  3. Under "Microsoft Exchange" make sure that "Contacts" is unchecked.
  4. Under your computer name (in my case, "Greg Laptop"), make sure that "Contacts" is checked.
  5. Connect the phone to the computer via sync cable, bluetooth, dock, etc. and Sync!

This should get the contacts on both your computer and your phone in the "FirstName LastName" format.  If it's not, you may have to delete the contacts off your phone before you sync with the computer.

As far as Google's contacts go, there is no way I can find to make the contacts there use the proper formatting.  Google's contacts will always use the "LastName, FirstName" format, which is why in the last few steps you removed contacts from syncing from Google (Google=Microsoft Exchange in this case).  They way I'm getting my contacts to Google is to just reverse where contacts are synced.  I sync with "Microsoft Exchange" and not with "Greg Laptop".  Once I sync them up, I put it back to only sync from the computer.  It would be a lot easier if Google would just fix this crap already, but it's not getting done.

If you can't follow these instructions, I suggest you do some more Google searches and brush up on your reading comprehension. I couldn't make this any clearer from the original.  And the best part about this looooong how-to?  It's all about Microsoft and I had to finish it in Linux because Windows kept crashing.

14Mar/103

A message about security

When I originally started this blog, it was entitled "Adventures in Networking" and it dealt primarily with networking and, more specific, Cisco network security.  Since that time I've written about everything from hurricanes to hacking an Western Digital NAS device and giving a $50 Linksys router the power of a $500 Cisco box.  Lately, I've been posting how-to's for all kinds of stuff and it's time to take a step back and talk about security for a little bit.

A web hosting client of mine got his site hacked in the past couple of days.  About a year ago, I installed phpBB3 for him and setup his domain on my server.  After that, I acted as admin on the forums and stuff like that.  Well, phpBB3 got neglected and hadn't been updated in a while.  It was running version 3.0.6 while the latest version was 3.0.7-PL1.  4 versions have been released since the last update.  When the site got exploited, he looked at me like it was my fault.  In fact, he told me something along the lines of "I paid you to build a site that was secure and you didn't do that".  Well, I did build him a secure site a year ago, but in the past year, there has been enough holes found in phpBB3 to kill a horse.

I'm sure that any freelancer or businessman out there has had to deal with clients that don't understand what it is exactly you do.  This happens a lot to me due to the range of things that I do.  But in this instance, the client was under the illusion that I was going to maintain the website and keep it up to date for him.  The original invoice that I sent for the site was simply 8 hours of work to get everything installed and setup properly and for a year of hosting.  Since that first invoice, I have fixed little errors here and there for him without invoicing him because it's little things that only take a few minutes to take care of.  Plus, the guy is a real good friend of mine and has been my friend since before we started doing business together.  I do freebies for a lot of my customers from time to time.  Maybe I messed up by doing these repairs and not charging him for them and by doing that I lead him to believe that I was doing it all for free.

I logged into the site this morning to notice that it had been defaced.  Some hacker managed to get in and screw around with the AdminCP.  Language packs were messed with, 300+ accounts were created and a bunch of spam had been posted.  I went ahead and fixed everything that happened and went through the process of upgrading phpBB3 to the latest version.  It took me about 2½ hours to get it all cleaned up and upgraded.  Once I was done, I submitted a service ticket for the work.  Here's another place I screwed up.  I should have asked him if he wanted me fix it first because we don't have a service agreement between the two companies.

Well, the site got upgraded to the latest version of phpBB3 and it was working fine.... for about 3 hours.  That's when our little hacker managed to get back in and lock me out completely.  My best guess is that there's a zero-day exploit on phpBB 3.0.7-PL1 that will also work on all previous versions.  In that instance, there's not a whole lot I can do about it other than block the proxies that he's used to get to the site with or just shut the site down.  Well, I shut it down.

Here's where the main problem starts.  The customer assumed that it was my responsibility to update the software for him.  I don't go to HP and bitch at them because there's holes in Windows.  Once I install the software, it's up to the client to keep that software up to date.  All of my other web clients know this and they keep their CMS software up to date.  If we would have set up a service contract in which I said I would maintain the security of his site, then it's no problem.  It's my responsibility to fix the security issues that come up, but there's no agreement there.

Also, the client wants 100% security. We all know that 100% security does not exist and never will exist.  He didn't like the fact that I used open-source software for the site because people can read the source code.  Well, the open-source stuff is free, so that's why it was used.  But even closed-source software has security holes in it.

To wrap up this rant, I wish people could understand that the only secure computer is one that's powered down and unplugged from the internet.  A friend once told me that if you installed a fresh copy of Windows XP (no service packs) on a computer and plugged it directly into the internet, it would be rooted within 12 seconds.  12 seconds! There is no security, only the illusion of it.

-Greg

11Mar/102

Idea for a new kind of company; looking for public opinion.

I was sitting around the other day and came up with an idea for a different kind of company.  It's not exactly a Co-Op, and it's not exactly an ESOP.  It's something different, but a cross between the two.  I've spoken with a friend of mine that's a business management consultant and he's never heard of someone doing what I'm thinking about and that's why I turn to you, the internet.  It's hard to put this idea into words, much less try to convey it in a short period of time, so please bear with me here because I'll be all over the place.  We'll call the company QWERT for the sake of space and time.

QWERT would be a partnership of freelance web designers and programmers.  Every freelancer has a project that he's never gotten too because it's just too big for them to do alone or they just don't have the time to complete the entire project alone.  A bunch of talented people come together to work on each others projects.  I would pick 2 or 3 people that I know are VERY talented individuals that have money making ideas that just haven't been worked on yet.  Once the 4 of us are together, we start looking for more people.  To become a member of QWERT, you need to have a project that all other members agree on unanimously.  You also have to have talents that are provable through your portfolio and all other members have to agree on that unanimously.  The projects should be picked by the complexity of each part of it.  You want to make sure that throughout the projects the work would be spread around evenly based on each person's specialty.  You'd have one heavy programming project and one heavy flash.  One heavy database and one heavy graphics.  You get the idea... spread the work around so no one "department" is consistently working more than anyone else.

One we build a team of 10 or so people.  Once the team is built, we vote on which projects we want to work on or we chose them at random.  I don't know on that one 100% yet.  Once we finish a project, we move on to the next and so on.  During the voting process, we would try to bring projects up for vote in such a way as to give the specialty of the last project a "break" on the next one.  You don't want to do two heavy database jobs back to back.  Every person has to work on every project.  There are NO exceptions.  That's the only way this plan works.

Every member of QWERT will be an equal "owner" of the company.  All profit of the company is split equally between everyone.  There 's no managers.  The person who's project we are working on will act as project manager for that project.  They will still do their specialty, but they run the project.  An outside management company will run the financial aspects and be the registered agent.  No member of QWERT will have access to any of the company credit or anything like that, but all financial decisions will be made by the democratic process.  The Agent will only act on our behalf and under the direction of QWERT.  The Agent would be the ones paying the members their share out of the company fund after all expenses are paid.  And no, a new laptop for you to work on is not a company expense.  Pay for it yourself.

There's no sales department, we only work on our own projects.  Once we run out of the original projects, we start coming up with new ones.  This would not be a full time job, but something that people who have some free time and want some side work would do.  Our meetings would be held over something like GoToMeeting and we'd use collaboration software to make sure everyone's on the same page.

Well, that's the basics.  There's more holes than a brick of Swiss cheese, and there's a lot more thought that needs to go into it, but I want to get opinions on the basic idea.  Do you think this is something that could work?  If you were in a position to do some side work and you fit what QWERT needs, would you consider doing it?  What would you change or add?  Please, PLEASE leave a comment with your opinion, no matter how harsh you think it is or how dumb.  I want ALL opinions here.  Let's use the hive mind of the internet and create an entirely new kind of company and an entirely new way of doing business.

   
10 visitors online now
10 guests, 0 members
Max visitors today: 15 at 02:11 am UTC
This month: 22 at 09-02-2010 09:27 pm UTC
This year: 106 at 08-27-2010 05:48 am UTC
All time: 106 at 08-27-2010 05:48 am UTC

Switch to our mobile site