I'm a fan of the Ghostery apps and plugins - they allow one to keep an eye on just how many other people are trying to snoop over my shoulder when I'm on the web.
The latest version of the iOS Ghostery app (v1.4) mentions a new feature called 'Wifi Protection via proxy automatic file (aka PAC file)', but with little explanation as to what it is... I took a look at this new version at it seems they've come up with a way to add tracker blocking for ALL apps when connected to WiFi. They have done this by creating a custom PAC file which you need to copy and paste into your WiFi setup which then provides for filtering (in Javascript) of trackers for all connections when on that WiFi network (you will need to copy and paste the PAC file for each WiFi network you connect to for it work on all WiFI networks you connect to). To enable it you click on the WiFi button in Ghostery and follow their instructions.
If you're paranoid you can download their Javascript PAC file and host it on your own server (and modify the PROXY entries so it uses your own server to return 'HTTP/1.1 204 No Content').
This looks like a pretty nice feature, though they caution that one should use Chrome or Ghostery as Mobile Safari may be a bit slow.
One thing that comes to mind is that us of PAC files could provide for a nasty security hole as you can basically fill them with an arbitrary JavaScript function that could do all sorts of fun stuff like redirect your more sensitive web visits elsewhere. This is not to say Ghostery is doing this but it just brought to mind the possibilities - so beware of random PAC files.
Tuesday, 21 January 2014
Thursday, 7 November 2013
VLAN's on linux
A quick search for VLAN setup on Linux brings up a few old docs which suggest the use of the 'vconfig' utility. But these days one can use the very versatile 'ip' command as explained here. For example one can create a VLAN interface on the eth0 hardware interface with VLAN ID 2 like this:
sudo ip link add link eth0 name eth0.2 type vlan id 2One can assign an address to the interface like a normal interface:
sudo ip addr add 192.168.2.2/24 dev eth0.2And to delete the address:
sudo ip link del dev vlan0 type vlan id 2To show list full details of the interfaces (including VLAN id):
ip -d link
Tuesday, 5 November 2013
iOS7 uses IPv6 privacy address extensions
I got a curious warning from Google about a 'Suspicious sign in prevented' which turned out to be a connection over IPv6 from my iPhone to Gmail. I'm aware that I've been using IPv6 for a while now - it's been in iOS since iOS4 I think - so either Google has recently started warning people about changing IPv6 logins, or iOS7 has updated their implementation to include IPv6 privacy extensions (Specified in RFC4941). Either way it seems iOS7 is definitely using IPv6 privacy addressing (and possibly older versions of iOS also) which means that the IPv6 address of your iPhone/iPad will change over time and will not reflect the underlying Ethernet hardware MAC address (as it does for the basic stateless autoconfiguration).
It seems that privacy addressing is becoming the default as a number of OSes have adopted them (Linux, OSX, Windows) a while ago. Overall I think it's a good thing as I'm not sure I want my device to potentially be tracked by its hardware address (which is largely contained in a normal autoconfigured IPv6 address).
It seems that privacy addressing is becoming the default as a number of OSes have adopted them (Linux, OSX, Windows) a while ago. Overall I think it's a good thing as I'm not sure I want my device to potentially be tracked by its hardware address (which is largely contained in a normal autoconfigured IPv6 address).
Tuesday, 22 October 2013
Compressing videos quickly
I was compressing some videos today using the venerable ffmpeg and noticed things going rather slowly. Then I spotted that the H.264 library libx264 was saying: "using cpu capabilities: none!" - Ah that might explain it...
I'm on a Mac OSX machine using a version of libx264 from MacPorts. It turns out that the default install does not enable any CPU optimisations. So I just needed to rebuild it with asm variant to enable it's assembly code based optimisations:
If you're on Linux/Windows/Raspberry-Pi you're probably running the same problem. This is because the people who ship software need to compile it in a way that runs on most machines - which means it's not going be tailored to run best on your particular machine. So the helpful folks at ffmpeg have put together a compilation guide on how to do it yourself.
I'm on a Mac OSX machine using a version of libx264 from MacPorts. It turns out that the default install does not enable any CPU optimisations. So I just needed to rebuild it with asm variant to enable it's assembly code based optimisations:
sudo port -u install x264 +asmI reran ffmpeg and libx264 logged that it was using a whole string of it's CPU specific optimisations and running a whole lot faster!
If you're on Linux/Windows/Raspberry-Pi you're probably running the same problem. This is because the people who ship software need to compile it in a way that runs on most machines - which means it's not going be tailored to run best on your particular machine. So the helpful folks at ffmpeg have put together a compilation guide on how to do it yourself.
Thursday, 19 September 2013
iPhone Call blocking available on iOS 7
Following my previous post on how to block callers on iOS6. With iOS7 it is now finally built into the system - you just go to Settings->Phone->Blocked and add whoever you [don't] like! You can also add to the Blocked list from Settings->Messages->Blocked or Settings->Facetime->Blocked. Note: Once you've blocked them they won't be able to Call, Message, or Facetime you.
Monday, 16 September 2013
Scam: Amazon complimentary £50.00 Gift Card
I looked at my inbox today and saw what initially looked like a very generous offer from Amazon - too good I thought... But the email looked pretty genuine - the to and from addresses were good (though full email headers revealed a potentially dubious return address), the graphics and wording seemed pretty good. The only odd thing was that they used a tinyurl.com redirection, which is something they don't normally do. Plus unfortunately tinyurl.com don't make it easy to find out where their links actually take you without clicking on them. So I clicked on it and it brought up a very good version of Amazon's login page. The URL looked curious as it wasn't your normal 'http' scheme, it was a 'data' one (e.g. data:text/html;base64,PCFET0NUWVB...) which I'd not see much. What they have done is encode the entire page in the URL using 'base64' encoding. Looking at the links on the page they all seem genuine on the surface but they have added their own subverted javascript which would steal your login and password if you attempted to login. You can decode the base64 encoding to check, either by viewing source on your browser or just to make sure by copying the whole URL and running:
So basically if something looks too good to be true - it usually is!
base64 -D -i amazon-scam.url -o amazon-scam.htmlFortunately a few people have twigged that it's a scam and there's a discussion on Amazon's help pages.
So basically if something looks too good to be true - it usually is!
Wednesday, 11 September 2013
Disappearing log plots and lines
I was doing some plotting using iPython --pylab which uses the handy matplotlib to draw things. The stuff I was plotting was a bit all over the place so I thought I'd switch to log mode using pyplot.yscale() (though you can also use axes().set_yscale()):
Basically it comes down to the fact that some lines/points were at zero which is problem for a logarithmic representation as the log of zero is -infinity (-∞). Of course iPython has a work around which is to use their symlog axes scale, which combines log and linear scales using a threshold linthreshy at which they change:
Note: All these commands work for the x axes as well - just change the 'y' for an 'x'.
yscale('log')
Suddenly a few of my lines just went missing - What was the problem here ? Basically it comes down to the fact that some lines/points were at zero which is problem for a logarithmic representation as the log of zero is -infinity (-∞). Of course iPython has a work around which is to use their symlog axes scale, which combines log and linear scales using a threshold linthreshy at which they change:
yscale('symlog',linthreshy=1)
You can also have a problem with negative values and log plots as the log of a negative number cannot be represented in normal (real) numbers (use need complex numbers for that). But you can get around that in iPython using the symlog as well - as explained here. Note: All these commands work for the x axes as well - just change the 'y' for an 'x'.
Thursday, 20 June 2013
Accessing the contents of a Time Capsule disk
So I took my (1st Gen) Time Capsule apart and switched the old 500GB drive for a 3TB drive - which worked in principle. I was impressed that the old thing could handle a 3TB drive ok. The problem that I increasing encountered was that Apple's File Sharing (AFP) server kept crashing - which basically meant my Time Machine stopped working and I had to go and manually switch it on and off every day.
To fix this issue I took the disk out of the Time Capsule and put it into an externally powered USB 3TB capable enclosure so that Time Capsule finally worked reliably again (and no longer crashed). The reason this worked was because the crashing was down to overloading of the power supply (which led to the crashes) in the Time Capsule itself - by moving the disk outside meant that the power to main board of the Time Capsule was now more stable, plus it wasn't getting over heated (which is another problem that besets such small embedded systems).
But along the way when I took the hard drive out of the Time Capsule and tried to look at it on my computer I only found two rather oddly named partitions - APswap APconfig. After searching on the net it seemed there should have been a third partition named Data but it was not showing up?! I was very puzzled as it showed up when inside my Time Capsule. After a lot of faffing about I finally discovered that problem was down to a hardware issue - all the harddrive enclosures I had tried with my drive were not actually capable of reading a 3TB drive - though they were all happy reading a 2TB drive (but quite few enclosures can only read 1Tb or less - so check this if you're having this issue). So I finally managed to find a 3TB capable enclosure and it reads the disk fine and mounts the Data partition (and may be used for external connection of the disk to my Time Capsule so it works as I explained above).
I did also try to mount the disk from Linux but the default filesystem used by the Time Capsule is Apple's HFS+ with journaling enabled used to be not so straightforward to mount. It seems that Linux now mounts hfsplus disks with journaling switched on without a problem (though I'm not clear whether what happens to the jornaling?). On older versions it's also possible to force mount the drive using Linux's hfsplus filesystem driver. It seems that under Lion it's no longer possible to switch off journaling on HFS+ using Disk Utility which is a pain - though I understand that it can be switched off using the diskutil command.
One final thing I tried was set up a Linux box as Time Machine capable network drive. One thing I learned along the way was that Linux's HFS support (i.e. Apple formatted disks) is not rock solid and it would crash when running the backups so I had to change the disk format of my backup drive to use Linux's ext3 filesystem instead (then I could use the ext2/3 fuse filesystem to mount it on OSX). This basically seemed to work on one of my machines, but unfortunately it seemed less reliable on another (It lead to this error message every so often: "Time Machine completed a verification of your backups. To improve reliability, Time Machine must create a new backup for you." - which makes it useless) so I've gone back to using the old Time Capsule with an USB external disk (having removed the internal one which means it no longer crashes).
[updated:9sept13]
To fix this issue I took the disk out of the Time Capsule and put it into an externally powered USB 3TB capable enclosure so that Time Capsule finally worked reliably again (and no longer crashed). The reason this worked was because the crashing was down to overloading of the power supply (which led to the crashes) in the Time Capsule itself - by moving the disk outside meant that the power to main board of the Time Capsule was now more stable, plus it wasn't getting over heated (which is another problem that besets such small embedded systems).
But along the way when I took the hard drive out of the Time Capsule and tried to look at it on my computer I only found two rather oddly named partitions - APswap APconfig. After searching on the net it seemed there should have been a third partition named Data but it was not showing up?! I was very puzzled as it showed up when inside my Time Capsule. After a lot of faffing about I finally discovered that problem was down to a hardware issue - all the harddrive enclosures I had tried with my drive were not actually capable of reading a 3TB drive - though they were all happy reading a 2TB drive (but quite few enclosures can only read 1Tb or less - so check this if you're having this issue). So I finally managed to find a 3TB capable enclosure and it reads the disk fine and mounts the Data partition (and may be used for external connection of the disk to my Time Capsule so it works as I explained above).
I did also try to mount the disk from Linux but the default filesystem used by the Time Capsule is Apple's HFS+ with journaling enabled used to be not so straightforward to mount. It seems that Linux now mounts hfsplus disks with journaling switched on without a problem (though I'm not clear whether what happens to the jornaling?). On older versions it's also possible to force mount the drive using Linux's hfsplus filesystem driver. It seems that under Lion it's no longer possible to switch off journaling on HFS+ using Disk Utility which is a pain - though I understand that it can be switched off using the diskutil command.
One final thing I tried was set up a Linux box as Time Machine capable network drive. One thing I learned along the way was that Linux's HFS support (i.e. Apple formatted disks) is not rock solid and it would crash when running the backups so I had to change the disk format of my backup drive to use Linux's ext3 filesystem instead (then I could use the ext2/3 fuse filesystem to mount it on OSX). This basically seemed to work on one of my machines, but unfortunately it seemed less reliable on another (It lead to this error message every so often: "Time Machine completed a verification of your backups. To improve reliability, Time Machine must create a new backup for you." - which makes it useless) so I've gone back to using the old Time Capsule with an USB external disk (having removed the internal one which means it no longer crashes).
[updated:9sept13]
Subscribe to:
Posts (Atom)