Effective skimming

Bellow is a picture of a new type of skimmer being used in the USA use to skim ATM cards. The construction is HIGHLY convincing, and the placement of the pinhole camera is quite something! Even the tone of the colour of  the original receiver has been matched!

Card Skimmer

Thankfully, many ATMs in the UK use  a recess instead of a protrusion, so it should be more difficult to develop a device which fully fills the gap in a convincing manner.

Star7 PDA Prototype



This little box seems to be quite far ahead of its time. I can imagine that there must be so many futurologist out there just waiting to see their ideas come into the mainstream, and then jump for joy when it finally does!

Future could be brighter for Sun as it merges with Oracle

It has been announced today that approval has finally been given for Oracle to merge with Sun Microsystems. The process began in September 2009 which means that its been long enough for plenty of rumours to go around about whats going to happen both internally with head count cuts, and of course with the product line itself. Most importantly, the people with power to make decisions in these two structures now actually have the opportunity to go ahead and make those decisions.

If Larry is true to his word about what he sees for the future of the Sun product line, I for one would certainly say that the future is going to be fairly bright.

Mr Ellisons (CEO of Oracle) own words:

“We are keeping everything. We are keeping tape, we are keeping storage, we are keeping x86 technology, we’re keeping SPARC technology, we’re going to increase the investment in it…”

“…we are NOT going to spin anything off.”

The discussions about improving data center power consumption efficiency and increasing demand for online services place the T-series equipment very well for those who know just how good they are. Coupled with the fact that Sun had famously invested early in the R+D for this kind of technology, theres also a great opportunity to get OpenSolaris beefed up in terms of packages and installers, and deployed in these environments.

I’m looking forward to seeing how its all going to pan out!

python’s HTTP server

Python comes with an HTTP server built in, making sharing directories on your *nix machines as easy as:

anton@opensolaris:~/mess/test$ python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 …
localhost – - [26/Sep/2009 00:23:47] “GET / HTTP/1.0″ 200 -
localhost – - [26/Sep/2009 00:24:24] “GET / HTTP/1.1″ 200 -

So now when we go to localhost:8000 , we get the directory!:

anton@opensolaris:~/mess$ lynx -dump localhost:8000
Directory listing for /
__________________________________________________________________

* [1]lalala
__________________________________________________________________

References

1. http://localhost:8000/lalala

…or…

anton@opensolaris:~$ lynx -source localhost:8000
<title>Directory listing for /</title>
<h2>Directory listing for /</h2>
<hr>
<ul>
<li><a href=”lalala”>lalala</a>
</ul>
<hr>

…for those of you that want to see the source it produced! A very quick short term solution if you don’t want to go about setting up apache or change your apache settings!

Indexing your man pages

Its not as boring as you think, but you’ll HAVE to do it when you don’t have a windex file and want to search using man -k :

anton@opensolaris:/$ man -k grub
/usr/share/man/windex: No such file or directory

To get round this, we simply go ahead and create the index with catman:

anton@opensolaris:/$ pfexec time catman -w

real        2.9
user        1.8
sys         0.1

Its pretty quick, and you get left with a little index in /usr/share/man/windex. Its just an ascii version of all the names of your manpages, plus a one line summary of what each one does:

1        1 (3openssl)    - OpenSSL configuration functions
1        1 (3openssl)    - OpenSSL configuration functions
1394        ieee1394 (7d)    - Solaris IEEE-1394 Architecture
2        2 (3openssl)    - \& OpenSSL configuration cleanup functions
2        2 (3openssl)    - \& OpenSSL configuration cleanup functions
2        2 (3openssl)    - \& OpenSSL configuration cleanup functions
2.1        EasyTAG (1)    - Tag editor for MP3 and Ogg Vorbis files
2_F32_Sat    mlib_SignalConvertShift_U8_S8_Sat (3mlib)   – data type convert
with shifting
5.0        MySQL (1)    - MySQL RDBMS version 5.0 for Solaris
6to4        tun (7m)    - tunneling STREAMS module
6to4relay    6to4relay (1m)    - administer configuration for 6to4 relay router
communication
6to4tun     tun (7m)    - tunneling STREAMS module
7-Zip        7-Zip (1)    - A file archiver with highest compression ratio

So now when you do your man -k , you’ll get something useful!:

anton@opensolaris:/$ man -k grub
bootadm     bootadm (1m)    - manage bootability of GRUB-enabled operating system
grub        grub (5)    - GRand Unified Bootloader software on Solaris
installgrub    installgrub (1m)    – install GRUB in a disk partition or a floppy

Crucially you only want to do catman -w , otherwise you’ll be reformatting all your manpages!

From the man page of catman:

-w                  Only create the windex database that  is
used  by whatis(1) and the man(1) -f and
-k options.  No manual  reformatting  is
done.

Airport Security hole

I didn’t discover this one, credit to  Schneier for finding it.

The conversation goes something like this:

“Here,” dad to girl, “Get your ID out and have it with your ticket.”

“Excuse me, sir,” said the TSA officer, pointing to the young female, “She does not need to have her ID out, she’s a minor.”

Dad: “How do you know she’s a minor if you don’t look at her ID?”

…. (silence as everyone waits for answer)….

Dad again: “Kind of a hole in the system, isn’t it?”

TSA Officer, voice lowered … “There are a LOT of holes in the system, sir.” … walks away.

Young girl, “Good one, dad. Now tell her our name is LADEN and see what happens!”

Reminds me of the classic Kepner Tregoe quesiton; good, but good for what? :)

Fox found egypt!

Fox news posted this map of the middle east recently. Take a look where Egypt is:

LOL, slight move there!

LOL, slight move there!

All credit to the arabist.net for finding that! (And indirectly, credit to Mandy)

Khyber, the most dangerous place on earth?

According to Tariq Hayat Khan its safer than Chicago! This interview is a fascinating insight into the area, especially into the amount of power vested in one man to aminister an extremely significant area in Pakistan (but of course, quite far its nuclear weapons).

Chomsky said that violence works


You might wish it isn’t true, but its hard to disagree with him.

Half a half: Part 2

Ten days ago we had a look at Java’s ability to deal with numbers which had alot of decimal places. Liam pointed out that having to loop through a variety of operations is longer than performing a more efficient operation once.

With Liams magical formula, we get the following Java, with no loop:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import java.math.BigDecimal;
 
public class The_proper_half {
 
    public static Integer times_to_loop;
 
    /**
     * @param args the number of times you want to run the loop
     */
    public static void main(String[] args) {
        calculate(Integer.valueOf(args[0]));
 
    }
 
    public static void calculate(int times_to_loop) {
        //The Number we want to half
        BigDecimal number_to_half = new BigDecimal("10");
        //The result of doing the half
        BigDecimal the_half = new BigDecimal("0");
        //The number we want to divide by
        BigDecimal divider = new BigDecimal("2");
 
        the_half = (number_to_half.divide(divider.pow(times_to_loop)));
 
        System.out.println("The last number has " +
                ((Integer) number_to_half.subtract(the_half).toString().length()
                - 2) + " decimal places: ");
 
        System.out.println(number_to_half.subtract(the_half));
    }
}

As you can see, we only perform the opertation once (line 23), but admitadly, to get the correct number at the end, we still do the subtraction at the end!

Regarding optimisation, there are huge benefits. It turns out that the old way if hugely costly for thousands of iterations. These are the results for 10000 iterations, the old way:

anton@anton-laptop classes $ time java Half_of_a_half 10000 > /dev/null

real    5m22.714s
user    5m21.320s
sys    0m1.052s

The results for the new way are much better:

anton@anton-laptop classes $ time java The_proper_half 10000 > /dev/null

real    0m1.019s
user    0m1.248s
sys    0m0.052s

So it went from over five minutes, down to just a second. That was just by changing from a loop a single statement. Thats pretty cool stuff!

I have to admit here, the difficult bit is probably not the code. Its the abillity to see how a problem may be translated from one way of expressing it to another. Its that bit of genius thats really done the work here. Credit to Liam for the genius!