Archive for September, 2007

Begin of the semester

You can tell that the semester begins. Because the number of people online grows again. Because the lines at the subways increase.

Btw., I have this theory that the daily average length of the lines for semester tickets (seen over the days) forms a Maxwell-Boltzmann curve, but the lines for enrollment are a Gauss curve. Tell me if I’m wrong.

No Comments

Software can do anything you can imagine …
that’s part of the problem…

With software, you can do anything you can describe.

No Comments

Reverse hash database for bittorrent files (info_hash)

Hi!

This is probably the first reverse hash database for torrent files.

Before continuing, please accept that I am handling here with metadata, so no illegal material. Also, I don’t host anything illegal. The links to TPB are nofollow. So don’t sue me or do anything funny, al’right?

Who needs this?
After a .torrent-file is downloaded and the torrent is started, there is no way to find out what torrent it is, because it a hash, the info_hash (see http://wiki.theory.org/BitTorrentSpecification).
In order to know the .torrent-file that belongs to the hash, one has to have the torrent file. I here do a reverse linking of hashes to the torrents for the most popular torrent files on The Pirate Bay.

When watching torrent traffic as an network administrator, you might want to know if the data is legal and complies to your policies.
On the other hand, if you see a torrent loading in your network as a user, if you know what it is, it might be _very_ interesting to join it, as the speed can be expected to be very high.

Technical details are in the howto file.

Where is it?
The Bittorrent info_hash reverse database is here as html with links to TPB, and also available as txt.

Is this a complete database?
Of course not. I took only the most popular torrents down to ~37 leechers from TPB.

Update (2007-09-16):
Now with 12675 entries!!

No Comments

Sniffing & Firewall rules

Just found this on http://jeffsoh.blogspot.com/2007/06/wireshark-and-firewall-rules.html I want to share:

Click on any captured packet, and go to Analyze, Firewall ACL Rules. A dialog box will pop up showing you the syntax to write a rule denying or accepting the packet by IP, MAC, port or combination thereof depending on what device you choose. Supported is Cisco IOS, iptables, ipfirewall, Windows firewall, and pf (BSD’s Packet Filter firewall).

No Comments

Squid with parent proxy

This is a configuration for squid for using it with a non-squid parent proxy, i.e. without ICP. This makes especially sense if you want to save bandwidth.

cache_peer proxy.example.com parent 8080 0 no-query no-digest default
#cache_peer proxy.example.com parent 82 0 no-query no-digest login=user:pw
never_direct allow all

If direct fetching is not allowed due to the network structure, without never_direct allow all squid fails with “(110) Connection refused” errors. Using this line denies squid to try to fetch directly.

Other nice things:
Printing out often visited pages:

awk '{print $7}' < /var/log/squid/access.log |sort |uniq -c|sort -n|grep -vE '^ *[0-9] '

(the last grep strips off the entries with only one digit).

I found this very old command for listing the biggest cache objects at http://www.unix.org.ua/squid/FAQ-7.html:


sort -r -n +4 -5 /var/log/squid/access.log | awk '{print $5, $7}' | head -25

Here we have the first command, but for hostnames:

awk '{print $7}' < /var/log/squid/access.log |sed 's/^[a-z]*:\/\///g'|sed 's/\/.*//g'|sort |uniq -c|sort -n

No Comments