Простейший сниффер TCP и UDP трафика в три строчки

mknod backpipe p 
mknod log p
while :; do cat backpipe |nc -l -p 3001 |tee log| nc localhost 3000 |tee log >backpipe; done
Зависимости: (ba,k)sh, netcat, mknod, tee. Работает следующим образом. Скажем, нам нужно просмотреть трафик на порту 3000. Устанавливаем netcat сервер на 3001 порту, форвардим соединение в оба конца на порт 3000. Копию всего, что передаётся в обоих направлениях, пишем в файл log. Если вдруг соединение закрывается, запускаем всё заново.

When the state spams their citizens, what shall we expect from criminals?

I just received offline spam from Fedict in the form of a letter without any postage marks and with the text on the envelope stating:

"An important message from the government".

The letter contained an invitation to buy a bundle of a PC with 12 months of free internet access for 422 EUR.

Update: Apparently, the same letter was distributed (not sent by post, but carried to the postbox by a spam delivery company) to a big share if not all belgian residents.

Квота на евреев в американских университетах

Читаю книжку Фейнмана What Do You Care What Other People Think? Он там упоминает, что не смог поступить в Колумбийский университет из-за квоты на евреев. Интересно, как там сейчас с дискриминацией евреев.

There is still room for standards in IT

Look at the summary of ISO activities.

Being one of the youngest, JTC1 it is by far the most prolific ISO committee that spit over a total of 2268 standards for Information Technology, leaving far behind the TC34 with 749 standards for Food Products and TC22 with 715 standards for Road Vehicles.

And as if this was not enough, JTC1 has 620 standards in the pipe, waiting to be published.

Tags: 

How to force Drupal users into answering a poll

Here, the poll is hardcoded at node/38566 and the patch applies to index.php in the root of Drupal installation.

Tested on Drupal 6.14, but shall work on many other versions as well.

--- index-original.php      2007-12-26 09:46:48.000000000 +0100
+++ index.php   2009-11-23 16:12:11.000000000 +0100
@@ -33,6 +33,12 @@
 }
 elseif (isset($return)) {
   // Print any value (including an empty string) except NULL or undefined:
+  global $user;
+  $result = db_fetch_object(db_query('SELECT nid FROM {poll_votes} WHERE nid = 38566 AND uid = %d', $user->uid));
+  if ($user->uid > 0 && !$result && $_GET['q'] != 'node/38566') {
+    drupal_goto('node/38566', NULL, NULL, 301);
+  }
+
   print theme('page', $return);
 }
Tags: 

Pages