A blog about tech, programming, security, and various other subjects.

IPv6 addresses weird? It's v4 that's crazy  Tags: networking.
Dots are often used for hierarchy. Domains are backwards, but still hierarchical. Wireshark you can use tcp.port to filter on TCP ports. In many programming languages you specify an object's property as object.property. Does that property have methods you can use? Try another dot: car.wheels.length(). Dots are also commonly used as decimal separator.

Colons are often separ
To curl|bash or not to curl|bash  Tags: software, security.
People have a lot to say about how terrible piping from curl to bash is. These are the reasons people give:

1. It executes arbitrary code on your system!

I'm sure these people never ran a .exe file in their life.

2. The download could cut off mid-file and turn "rm /opt/something" into "rm /opt"!

Valid point! This is why we commonly wrap the installer as a big function, and call it in the end. If you care, you can even inspect the source to see if it does this, and if the software is on Github or something (curl|bash-using software usually is) or has nice developers, you can just let them know or send a pull request.

3. The code is not signed! If it was from the repositories, it would be signed.
Local File Inclusion by one misplaced character  Tags: security, websites.
"Uh-oh," I thought, as a good friend alerted me to a local file inclusion vulnerability in a site that I recently made. It's still in beta, not public yet, but still. How could this happen? I wrote code to prevent this!

The site has a ?page=mypage parameter that you could modify into anything, and it would just include the page instead of restricting it to existing and allowed pages. An absolute beginner's mistake, and I had thought of it, and secured it. Just not tested it.

I went to look at the code.

if (in_array($_GET['page'], array('about', 'contact', true))) {

    require($_GET['page'] . '.php');
Can you spot the error?
From a Nokia to a Note and back again: experiences  Tags: hardware, keyboards, computers.
About 22 months ago I got my first touchscreen phone and my first Android. I was pretty excited about this Galaxy Note II and it fully lived up to my expectations. Last week it broke down.

I'm back to my good old Nokia E75. Officially called a smartphone, it runs Symbian which is as powerful as your average shoebox. It has a numeric keyboard and a slide-qwerty, which means that you can touch-type and blindly navigate even inside your pocket. It is so small it actually fits in the palm of
Self-driving cars  Tags: randomthought, other, real life.
How much would you pay for a self-driving car? I'll let you think about that for a minute. Myself, I'd pay about all the money I could spend on it. The idea fascinates me and it really seems like an awesome future.

Not only will self-driving cars get you from A to B without having to drive, it will also prevent about a million deaths every year due to car crashes. It will likely solve all our traffic jam problems. It will make traveling by car faster because we no longer need speed limits for our slow human reflexes.

Next page / Older posts

Circle on Google+
Follow at Twitter

AI apps chat computers databases datetime e-mail hardware keyboard keyboards lol me music my blog my server networking nostalgia other privacy programming randomthought real life school security social networks software spam tutorials webdevelopment webhosting websites Windows writing