top | item 11791945

'NSA addition to ifconfig'

73 points| protomyth | 9 years ago |marc.info | reply

39 comments

order
[+] brynet|9 years ago|reply
That is just some diff someone sent to a mailing list, one real nifty feature of OpenBSD's ifconfig(8) is 'lladdr random', which will randomly assign a new MAC address to an interface.

Apparently well received by developers in airport lounges.

[+] egwynn|9 years ago|reply
According to the diff (and its accompanying message) this is what it supplements. It allows one to specify “nsa” instead of “random”, and it’ll fill in the first three bytes (with 00:20:91) for you.
[+] atmosx|9 years ago|reply
Hm, here:

    $ sudo ifconfig en0 ether `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`
[+] trothamel|9 years ago|reply
The joke being, of course, that 00:20:91 is the OUI (3-byte MAC address prefix) assigned to the NSA.
[+] int0x80|9 years ago|reply
NSA has a MAC address prefix??
[+] nickpsecurity|9 years ago|reply
That's funny. I like screwing with them, too. My last, temporary keypair was labeled "[email protected]." Smart people got a nice laugh out of it. Then, there was another category of persons that had sudden concerns about my true identity. They also had encrypted, authenticated mockery in their inbox upon voicing them.
[+] bitwize|9 years ago|reply
Smart people got a nice laugh out of it.

And smart FBI agents think it's very funny identity fraud.

[+] poizan42|9 years ago|reply
Completely offtopic, but am I the only one who don't like the usage of ! in the strcmp checks? To me conceptually !cond is checking for falsity, but the return value from strcmp is not logically a boolean
[+] bpineau|9 years ago|reply
It's just a shorthand for '== 0' (since !0 is true, and !<non-zero> is false). strcmp(3) returns 0 when the two strings are identical. So "if (!strcmp(a, b))" means "if the strings a and b are the same.
[+] int0x80|9 years ago|reply
In the general case I'm with you, but I think !strcmp is a very common idiom that makes me(and most C programmers) go "string equality". There is also the streq(a, b) camp that #define streq !strcmp.
[+] moosterv|9 years ago|reply
I agree. I also hate var++; on a line by itself. I'd prefer var += 1;