Why it is important to specify a character encoding

•October 29, 2009 • Leave a Comment

Many website designers design really scrappy websites that do not follow standards at all. I myself tend to write all my XHTML to be XHTML1.1 compliant. As a reader of this blog, I will assume you also attempt to follow standards.

Usually I implement everything to pass xhtml transitional validation. One thing I usually ignore however, is the character encoding.

Put simply, character encoding allows a browser to display and render the document as originally intended. For instance, browsing a site developed using a Japanese-based encoding (e.g. JIS X 0208) will not display correctly unless you have the JIS X 0208 character set installed on your computer.

Without specifying a character encoding, a default character encoding is used. So specifying a character encoding when developing sites that use other characters is a must. But a more important reason exists even if you only develop english websites using UTF-8 or ISO 8859-1. It is a potential security vulnerability.

Essentially, when a character encoding is not specified it could allow for a potential XSS-style attack. This can be achieved by encoding the javascript code using UTF-7. When a clients webbrowser attempts to autodetect the type of encoding used, it will detect it as UTF-7, and the javascript code can then be executed.

Your entire life.

•October 11, 2009 • Leave a Comment
The image you see below is earth. Hundreds of millions of miles away. This is your home and it will most likely be the place you live the rest of your life and eventually die. A Tiny, tiny dot in something unimaginably vast.
The small dot that we live on. A very small stage. In a vast cosmic arena.

The small dot that we live on. A very small stage. In a vast cosmic arena.

http://www.youtube.com/watch?v=2pfwY2TNehw

The extract below is from Carl Sagan. A rather famous astronomer that really puts this image into perspective.

“Look again at that dot. That’s here. That’s home. That’s us. On it everyone you love, everyone you know, everyone you ever heard of, every human being who ever was, lived out their lives. The aggregate of our joy and suffering, thousands of confident religions, ideologies, and economic doctrines, every hunter and forager, every hero and coward, every creator and destroyer of civilization, every king and peasant, every young couple in love, every mother and father, hopeful child, inventor and explorer, every teacher of morals, every corrupt politician, every “superstar,” every “supreme leader,” every saint and sinner in the history of our species lived there — on a mote of dust suspended in a sunbeam.

 

The Earth is a very small stage in a vast cosmic arena. Think of the rivers of blood spilled by all those generals and emperors so that, in glory and triumph, they could become the momentary masters of a fraction of a dot. Think of the endless cruelties visited by the inhabitants of one corner of this pixel on the scarcely distinguishable inhabitants of some other corner, how frequent their misunderstandings, how eager they are to kill one another, how fervent their hatreds.

Our posturings, our imagined self-importance, the delusion that we have some privileged position in the Universe, are challenged by this point of pale light. Our planet is a lonely speck in the great enveloping cosmic dark. In our obscurity, in all this vastness, there is no hint that help will come from elsewhere to save us from ourselves.

The Earth is the only world known so far to harbor life. There is nowhere else, at least in the near future, to which our species could migrate. Visit, yes. Settle, not yet. Like it or not, for the moment the Earth is where we make our stand.

It has been said that astronomy is a humbling and character-building experience. There is perhaps no better demonstration of the folly of human conceits than this distant image of our tiny world. To me, it underscores our responsibility to deal more kindly with one another, and to preserve and cherish the pale blue dot, the only home we’ve ever known.”

Facebook Privacy Breach

•September 11, 2009 • Leave a Comment

FaceBook-128x128Facebook, one of the web’s leading social networking websites has compromised private data.

Private data from thousands of users has been released despite the privacy settings on some profiles. It appears that anyone can access any data stored on the notes application, regardless of its privacy setting. This data is now easily accessible, as major search engines such as Google have already indexed the data.

Once again the security of social networking has come into question. Is it really safe to trust a company with information that details almost every aspect of our lives? Facebook has yet to comment on the latest data breach.

You can read more about this over at reddit.com.

Free VPN

•September 11, 2009 • Leave a Comment

If you don’t already know about VPN’s, go check out the article on Wikipedia.

I recently discovered a new VPN provider over at itshidden.com. If you’ve been looking for a free VPN, then it may be worth taking a look.

The blog is lacking in content lately due to life issues and other work. If you’re looking for more reading material then it might be worth checking out TheUltimateCouponSite Blog.

See ya’ soon!

I was a victim of the recent VAServ attacks

•June 12, 2009 • Leave a Comment

Some of you may have seen a recent news article about VAServ’s entire infrastructure being compromised leading to data loss/theft on over 100,000 sites.

I was a victim of this attack (I host around 6 sites on my VPS — all of which were downed). Luckily I managed to get into the server today, and it seems most of my files are intact (so far). A quick reboot of mysql and it seems everything is working as it should be.

Sadly the DNS provider was also hacked, so trying to access via domains will fail. Moral of the story? Always make backups. I almost lost EVERYTHING. Anything can happen.

You can read more about it over at slashdot.

Follow me on Twitter!

•May 29, 2009 • Leave a Comment

If you’re a reader of this blog and enjoy anything I write, you might wanna come check me out on twitter.

twitter.com/kahrn

I’m starting to get more comfortable with the whole idea of micro-blogging. It has its uses.

Looking for more linux?

•May 28, 2009 • Leave a Comment

If you’re looking for more linux-oriented content I have started a new Linux site. It can be found at linux.tdlabs.co.uk.

I plan on posting much of my linux-related articles to this site now as not all are suitable for this blog. I will also be posting howto’s and tips and possibly other content to the site. If you would like to join me in editing, refer to this post.

Using tor+privoxy in BackTrack 4

•May 28, 2009 • 3 Comments

By default BackTrack does not seem to come with tor or privoxy. These tools are very useful in providing anonymity. You can read about the tor project at wikipedia.

1. Install tor and privoxy
apt-get install tor privoxy

2. Modify privoxy configuration
nano /etc/privoxy/config
Add the line:
forward-socks4a / localhost:9050 .
Save the file (ctrl+o).

3. Restart privoxy
/etc/init.d/privoxy restart

4. Restart tor
/etc/init.d/tor restart

You should now have tor and privoxy running and you should be able to configure software to utilize tor by using 127.0.0.1:9050 in the proxy settings of the specific programs you want to push through the tor network.

Belkin F5D7051 USB WiFi and Linux

•May 27, 2009 • 3 Comments

These methods have been tested under Fedora, Ubuntu and BackTrack 4. All of the following should work in almost any linux distribution to get a Belkin F5D7051 (or possibly similar device) working in Linux for WiFi access.

By default the F5D7051 conflicts with 3 drivers (the rt* set of drivers). These drivers must be disabled, rndis_wlan must be loaded and then hopefully the strange problems will go away.

1. Remove Conflicting Drivers
rmmod rt2500usb
rmmod rt2x00lib
rmmod rt2x00usb

2. Reinsert the device

3. Load rndis_wlan
modprobe rndis_wlan

You should now restart NetworkManager and things should be good to go. You might wanna check out the bug report I made for Fedora/RH.

Statistics about the film industry — directly from the mouth of the MPAA

•May 3, 2009 • Leave a Comment

With the recent Pirate Bay trial, many are once again wondering about the future of the torrent scene, piracy, and the stability of the film industry.

Various sources would like you to believe that piracy is causing great harm to the film industry. When it is not. I don’t think the pirate bay should be liable for merely indexing torrents — that said, the attitudes of the staff in regard to piracy is questionable.

I think the most important thing to consider is the users. If you have such a tool available, it should not necessarily be taken down as hopefully some or many of the users will actually pay for the content (or would if the majority of it wasn’t going to already-heaping-rich-greedy-middlemen)

Regardless, here are some statistics..

The Domestic box office continued to grow in 2008, reaching $9.79 billion after a 1.7% gain. (refer to page 3 of the 2008 MPAA Theatrical Statistics report

Worldwide box office reached another all-time high in 2008 at $28.1 billion, an increase of 5.2% over 2007. (refer to page 2 of the 2008 MPAA Theatrical Statistics report)

The number of screens in the U.S. remain constant at just over 40,000 in 2008.

As you can see.. the movie industry is not suffering.