Archive

Author Archive

Password Salting Techniques

August 9th, 2009

This article is about using salting techniques to improve the security of authentication for websites.  Examples are in PHP but the techniques apply to any language. Read more…

AndyM Computers, Security, Web Development

Missing tooltips in Firefox 3.5 and IE8

July 5th, 2009

I’ve just upgraded to Firefox 3.5 and noticed that tooltips had stopped working.  I then checked Internet Explorer 8 and found tooltips were not working there either.

On investigation it seems that the two problems were unrelated, but here are the solutions to both of them…

Firefox 3.5

It seems there’s a bug in the Google Toolbar which can stop tooltips from working (you just get a small square instead). The fix is to uninstall Google Toolbar, then re-install it.

Internet Explorer 8

Bizarrely, this isn’t a bug.  It’s a rare occasion when IE does the right thing according to the W3C spec.  Basically, the HTML “alt” attribute has long been used to display tooltips over images, where in fact, it’s only supposed to be shown if the image doesn’t load.  The correct attribute for displaying tooltips is actually the “title” attribute.  Internet Explorer 8 has changed so that it works correctly according to the HTML spec.

What this means is that if a web page has only alt tags then in IE8 normal mode, you won’t see any tooltips.  If however the page is in IE8 compatibility mode, you will see the tooltips.

AndyM Computers

Run SysInternals tools direct from the web

January 22nd, 2009

SysInternals tools are a fantastic set of free utilities written by Mark Russinovich and Bryce Cogswell.  There are invaluable for system admins and Windows Power Users.
There is now a website that allows you to run most of the SysInternals tools directly, so you don’t have to find the right page, download it and unzip.  You just run it directly from:

http://live.sysinternals.com/<tool>.exe

e.g.

http://live.sysinternals.com/procexp.exe

This works better in Internet Explorer than Firefox, since you can run the tool without saving it first.

AndyM Computers, Windows

DOS Equivalent of GREP

September 22nd, 2008

In Unix you can pipe the output of a command into the GREP command in order to only display the lines that contain a required string.  This is means you don’t have to scroll through pages of output to find the bit you’re interested in.  The DOS equivalent of GREP is FIND:

Searches for a text string in a file or files.

FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] "string" [[drive:][path]filename[ ...]]

/V         Displays all lines NOT containing the specified string.
/C         Displays only the count of lines containing the string.
/N         Displays line numbers with the displayed lines.
/I         Ignores the case of characters when searching for the string.
/OFF[LINE] Do not skip files with offline attribute set.
"string"   Specifies the text string to find.
[drive:][path]filename
Specifies a file or files to search.

If a path is not specified, FIND searches the text typed at the prompt
or piped from another command.

this can be useful with the netstat command:

netstat -ano | find /i ":80"

or when viewing the DNS cache:

ipconfig /displaydns | find /i "google"

Although that isn’t ideal since the output of ipconfig isn’t really formatted to play nicely with the find command.

Reference: http://nzpcmad.blogspot.com/2007/07/dos-grep-equivalent-find-command.html

AndyM Computers, Windows

Windows XP DNS Cache

August 27th, 2008

Windows caches DNS responses to speed up network access, but sometimes this can cause a problem.  Positive responses (i.e. successful lookups) are cached for 24 hours, and negative responses (i.e. failed lookups) for 5 minutes.

If you make changes to DNS and want to test the results straight away, you need to clear the cache with:

ipconfig /flushdns

You can view the current cache with:

ipconfig /displaydns

or

ipconfig /displaydns | more

to see a screen at a time

AndyM Computers, Windows

Misc iPhone Tips

July 21st, 2008

Slow Response, especially in Contacts or Text

Some suggestions from around the web:

  1. It is probably caused by memory leaks in 3rd party apps.  You can close any app by holding Home button for 6 seconds.
  2. iPhone 3G was released with firmware 5a345 but iTunes 7.7 contains firmware 5a347.  Do a restore from iTunes to get the newer version. Make sure you have synced and backed up before doing this, since you are completely wiping the iPhone.  Lots of people are saying that helps.
  3. Rebooting the phone – hold power button for several seconds, it will ask you to slide to turn off.  Hold power button to turn it back on.  This is the same as rebooting any computer – you’re cleaning up the memory.

Battery Life

To extend the battry life, switch off WiFi, 3G and Bluetooth when you’re no using them. Hopefully someone will soon write a utility to do this easily and quickly from one place. I may even give it a go myself…

AndyM iPhone

Take screenshot on iPhone 2.0

July 21st, 2008
  1. Hold Home button
  2. Press Lock button

The screen will flash and image will be saved to Camera Roll

AndyM iPhone

Save an image from the web on iPhone

July 21st, 2008

With the iPhone v2.0 software you can now save an image from the web to the Camera Roll on the iPhone.  Tap and hold on an image in Safari and you’ll get a menu asking if you want to save the image.

Once it’s in the Camera Roll you can set it as wallpaper.

AndyM iPhone

Mac OS X keyboard shortcuts

July 14th, 2008

Useful OS X keyboard shortcuts, particularly if you’re switching from Windows.  It’s not exhaustive, but it’s got the ones I use regularly.

This page will be updated as I find new ones to include.

Read more…

AndyM Computers, Keyboard Shortcuts, OS X

Restore a Minimized OS X Window

July 14th, 2008

[Sorry, this post got corrupted and is displaying '?' instead of the keys. I'll fix it once I remember what they were... Oops. ]

In OS X you can swap between applications in a similar way to Windows (Alt+Tab on Windows, ?+Tab on OS X) however there’s one important difference – Windows swaps between all open windows, but OS X only swaps between apps.  The problem is that in OS X you can switch to the right application but the window you want can be minimized.

To restore the window from the dock you need to:

  1. Hold ?
  2. Press Tab until the correct app is highlighted
  3. Hold Alt
  4. Release ?
  5. Release Alt

It’s a bit tricky but you soon get the hang of it and it’s easier than picking up the mouse :-)

AndyM Apple Mac, OS X