Safari 4 Top Sites messes with your Google Analytics

I noticed some strange results in my google analytics account recently, getting a very high bounce rate from visits, and since this is a very small blog about very geeky stuff, a fairly high increase in traffic.

After some tweaking around in analytics it turned out that most of the new bouncing traffic came from Safari, from a machine with the same screen resolution as mine, from my city, my broad band provider and so on.

It turns out that this is because my blog had appeared on Safaris “Top Sites”, a grid of often visited web pages on the welcome screen of Safari. And every time you open safari, it contacts the webpage for an updated snapshot of the page.  This is recorded by analytics and regarded as a bounce visit, decreasing your average time on site and increasing your bounce rate.

So far, it doesn’t seem like there is any other solution to this except removing the site from “Top Sites”, until Google or Apple figure something out.  This of course does not solve the, for me not yet existing, problem of bogus traffic from other Safari users.

Posted in IT | Tagged , , | Leave a comment

Making international characters searchable in LaTeX documents

By default LaTeX generates some international characters in a weird way when building a PDF and so on. For example, the norwegian Å will be represented as ˚A, and thus making any word containing the letter impossible to find when searching for it. This can be solved by using the package fontenc, with the parameter T1 like this:

\usepackage[T1]{fontenc}

Now everything (at least for norwegian documents) should be working as expected.

Posted in LaTeX, Programming | Tagged , , | Leave a comment

Too Geeky….

Found on a bathroom door at “Høyteknologisenteret i Bergen”…

doer_soap

post_it_soap

word on the street has it Saiboten may in fact be geeky enough to have accomplished this feat

Posted in Humor | Tagged , | 1 Comment

Useful BASH-command: !!

When ever you use the terminal in Linux or OS X, and forget to add sudo in front of a command that needs the privileges, you can simply type sudo !! to run the same command with sudo. awesome. “!!” Will repeat the last issued command, and can probably be used for other useful things, too.

Thanks, Peder 2.

Posted in Programming | Tagged , | 2 Comments

Citing / displaying source code in LaTeX

I am writing my master thesis using LaTeX, a typesetting system most commonly used for scientific documents.  Since my thesis is in computer science, I have the need to display a fair amount of code.  After searching around the net and with some trial and error, I have come up with some settings that does this in a nice way.

It is based on the listings package, we define a lstset that handles the code.  This in combination with a nice caption makes for a nice presentation of source code.

Here is the final result:

LaTeX Source Code Screenshot

LaTeX Source Code Screenshot

“Read more” for the rest of the article

Read More »

Posted in LaTeX, Programming | Tagged , , , | Leave a comment

Hiding the Tab-bar in Thunderbird 3

In the new Thunderbird 3, Mozilla included tabbed browsing.  Since you usually don’t have tabs open all the time, it would be nice to be able to hide the tab-bar when no tabs are open.  There is a hidden option to accomplish this.  Thanks to Truben for pointing this out!

Read his article at http://truben.no/journal/auto-hide-tab-bar-in-mozilla-thunderbird-3/

Posted in IT | Tagged , | Leave a comment

Installing Wireshark on Mac OS X 10.6 Snow Leopard

After upgrading to Snow Leopard, one of the few things that stopped working for me was

Wireshark

Wireshark

Wireshark, a really cool network analyzer I’m planning to write more about later. What happened was that at startup you get a long list of error messages, and then no network interfaces could be found.

Luckily, Michael Gracie has scavenged the net for a solution, and found it.

Basically, all you need to do is follow the normal instructions, Dragging the app to the Application folder, the ChmodBPF folder in utilities to the StartupItems alias and the contents of the commandLine folder to /usr/local/bin.

Open a terminal and type:

cd /Library/StartupItems
sudo chown -R root:wheel ChmodBPF

enter your password and hit enter.

Now start up Wireshark, close the list of error messages, hit edit -> preferences -> name resolution, click the edit button next to “SMI (MIB and PIB paths)”, click “new” and type /usr/share/snmp/mibs/ in the text field.  Now click apply / OK, all your way out, exit, and reboot your computer.

After the reboot, everything should be working like a charm.

Posted in IT, Security | Tagged , , | Leave a comment

Learning web-security through penetration testing

At the ROOTS 2009 conference I attended a workshop with Martin Knobloch called

OWASP

OWASP

“Application Security – Awareness.”  Martin works for OWASP, The Open Web Application Security Project, and they have created a lot of cool stuff.  On the workshop we got an introduction to WebScarab and WebGoat, and for learning how a lot of software vulnerabilities work, they are great tools, and fun to play with.

WebScarab is a tool to analyze HTTP and HTTPS communication, and intercepts traffic as a proxy between your browser and the application you are analyzing, and let you look at and modify requests. WebScarab itself is not a training tool, but is supposed to be used for serious application analysis.

WebGoat is a Java web application hosted on a local tomcat server, which contains a lot of flaws and vulnerabilities. The application consists of a series of challenges, in which you use WebScarab to crack your way into the application.

The challenges range from very simple stuff like scanning through source code to look for hardcoded passwords, to more interesting things like Cross Site Scripting and SQL-injection for stealing credit card numbers.

Both tools can be downloaded for free from the OWASP download page, and since it is written in Java, it works on all platforms.

Just be sure to disconnect from the internet before starting WebGoat, since it opens up your computer to all the vulnerabilities it contains while it is running.

Posted in IT, Security | Tagged , , | Leave a comment

Spoofing your MAC-address in Snow Leopard

This might not be the most useful hack, but in some scenarios it might be good to know.  And it does show those who believe that blacklisting MAC-addresses on their access point is a good security feature that they are mistaken.

For example the system they used at the college I lived in at the University of Newcastle, where you had to send in a paper form to register your mac-address to the ethernet outlet in your room, and weren’t able to use the internet on your laptop when visiting friends on the campus.

Be aware that using these commands to work around such a policy is probably illegal, though.
In snow leopard, spoofing your ethernet MAC-address is as easy as opening a terminal, and type sudo ifconfig en0 lladdr aa:bb:cc:dd:ee:ff

The address can of course be anything you want it to be.

For spoofing the address of your airport card you first have to disconnect from the network you are currently on, this can be done by clicking the airport-symbol in the menu bar, select join other network, type some random name, hit connect and then cancel. Now type

sudo ifconfig en1 lladdr aa:bb:cc:dd:ee:ff

And then you can reconnect, with your new address.

Update:

Captain Future has created an applescript for spoofing the mac address that looks very nice.  It can be found here. Thanks!

Posted in IT, Security | Tagged , , , , | 10 Comments

Podcastination

The guys at the office, Peder1, Tobias and Morten have started a podcast called Podcastination.

Podcastination

Podcastination

It’s being hosted here, at josteinb.com/podcastination.  Who knows, maybe I’ll have to chip in soon too.

It’s supposed to be a weekly event, with light entertainment.  The podcast is in norwegian.  The pilot is out now!
Edit:  The podcast can now also be found at podcastination.josteinb.com

Posted in Humor, Podcast | Tagged , | Leave a comment