PLanET ABhisEK
< September 2006 >
SuMoTuWeThFrSa
      1 2
3 4 5 6 7 8 9
10111213141516
17181920212223
24252627282930

Sat, 30 Sep 2006 11:05:00 IST

Durga Puja '06

Surely it is the biggest festival for bengalies.

This year I got the oppurtunity to try my hands on a Sony DSC-H2, so went for some hunting on Panchami along with my friends..

dsc00248 dsc00247 dsc00246 dsc00245 dsc00244 DSC00155 DSC00154 DSC00153 DSC00151 DSC00150 DSC00148 DSC00146 DSC00143 DSC00142 DSC00141 DSC00139 DSC00137 DSC00136 DSC00135 DSC00134

Time to go back boozing, in the mean time.. Click Here if you care to see some more Durga Puja 06 pics.

posted at: 11:05 | path: / | permanent link to this entry

Mon, 25 Sep 2006 18:30:00 IST

Therez more in life than ./

Just managed to wake myself up after around 4 hours sleep, post Sankarpur(06) trip which ended today.

Normally I prefer mountains (gosh! am a trekking lover) over sea, but this sea side trip was pretty good especially with the awesome food and considerably fine alchohol.

Time to upgrade my flickr account and upload some pictures..

posted at: 18:30 | path: / | permanent link to this entry

Sun, 17 Sep 2006 20:17:00 IST

RIP lilo

May his soul rest in peace!!

posted at: 20:17 | path: / | permanent link to this entry

Fri, 15 Sep 2006 16:28:00 IST

RUBY ROCKZ!!

Oh yes, I am getting more and more impressed with Ruby.

Ruby being an apparently *very* simple and aesthetically pleasing language, but internally it is very complex in its implementation along with quite a few awesome and very intelligent hacks.

People interested in giving ruby a shot should surely start with the following:
* About Ruby
* Ruby in 20 min

People interested in Ruby internals can take a look at "Ruby Hacking Guide".

Oh and before saying bye for the day, I would love to give away some fun.
A nice and *probably* usable ruby shell ;-)

#!/usr/bin/ruby
require 'readline'

class RShell

   def initialize()
      Signal.trap('INT') {
         puts "Enter exit/quit to exit shell"
      }
   end

   def unixcmd?(cmd = nil)
      return nil unless cmd

      paths = ENV["PATH"].split(':')
      paths.each do |p|
         file = "#{p}/#{cmd.split(' ',2)[0]}"
         return true if File.exists? file
      end

      false
   end

   def run

      loop do
         cmd = Readline::readline("rsh #{ENV['PWD']}> $ ", true)
         exit if cmd =~ /exit|quit/
         if unixcmd? cmd
            system(cmd)
         else
            begin
               eval cmd
            rescue
               puts "Command not found"
            end
         end
         
      end
      
   end

end

RShell.new.run

http://eos-india.net/abhisek/codez/misc/rsh.rb

posted at: 16:28 | path: / | permanent link to this entry

Mon, 04 Sep 2006 22:58:00 IST

RIGHT or WRONG ??

Recently I came across a class of people who are firm believers of relativity and the concept of reference frame. According to them there doesnt exists anything which is absolutely right or absolutely wrong. This discussion about right or wrong was going on over a dinner table along with drinks and most of us including the speaker was considerably drunk. So at that time I couldnt really find any vulnerability in this statement.

But later, with possibly better realization, I think we are living in a world where there are certainly _very_ few people who truely grasp the concept of relativity and that of reference frame, ofcourse me being in the majority.
Not that the word relativity here has anything to do with "The Theory of Relativity" technically, but conceptually or psychologically it might have some relation which I couldnt figure out yet. So its better to consider _generally_ right as right and _generally_ wrong as wrong in most circumstances especially where it has something to do with the interest of the _general_ else it might turn up into cheap hypocricy to hide weakness/cheapness.

Although somewhat irrelevant, but I always used to think that I am a supporter of modern education/thinking but somehow now I think I am quite back dated from the point of view of mentality, because I am really sick and tired of artificial people trying to follow Dale Carnegie blindly.

posted at: 22:58 | path: / | permanent link to this entry

Sun, 03 Sep 2006 11:24:00 IST

Ruby Libnids Binding

Libnids is an implementation of an E-component of Network Intrusion Detection System. It emulates the IP stack of Linux 2.0.x. Libnids offers IP defragmentation, TCP stream assembly and TCP port scan detection.

Libnids Homepage: http://libnids.sf.net

For the uninitiated, each TCP session is identified by calculating a hash on
i) Source IP address
ii) Source Port
iii) Destination IP address
iv) Destination Port

So for an user space TCP stream reassembly, a hash table needs to be maintained and on capture of every TCP packet, the hash is to be calculated and the packed should be classified into an appropriate stream.

Libnids mimics Linux 2.0.x TCP stack implementation on user space.

Such wonderful power of monitoring and uniquely identifying each TCP session if available in Ruby would make it more powerful, with this idea in mind I did the Ruby wrapper for libnids library last week.

The project page is located at: http://ruby-libnids.rubyforge.org
I upload testing codes at: http://ruby-libnids.rubyforge.org/testing/

An example script may look like this.

require 'libnids' 

$l = 0 

def callback(opts = nil, ss = nil) 
   return unless opts 

   case opts["nids_state"] 
      when NIDS::STATE_JUST_EST 
         str = String.new
         str += "[NEW CONNECTION] #{opts['saddress']}:#{opts['sport']} --> "
         str += "#{opts[ 'daddress']}:#{opts['dport']}" 

      when NIDS::STATE_DATA 
         str = String.new
         str += "[DATA] #{opts['saddress']}:#{opts['sport']} --> "
         str += "#{opts['daddress' ]}:#{opts['dport']} " 
         str += "[SEND: #{opts['server_data_len']}] [RECV:
#{opts['client_data_len']}]" 

         puts str

      when NIDS::STATE_CLOSE, NIDS::STATE_RESET 
         str = String.new
         str += "[CLOSE] #{opts['saddress']}:#{opts['sport']} --> "
         str += "#{opts['daddress ']}:#{opts['dport']}" 

   end 
end
$l = NIDS::Sniffer.new 
$l.register_tcp(self, :callback) 
$l.run 

This thing is pretty new at the moment and tested only on a network of around 10 systems. I dont think it will be much efficient on high speed networks with large number of parallel TCP connections.

and oh, last but not the least, special thanks to Sumit Datta for making the webpage for http://ruby-libnids.rubyforge.org

posted at: 11:24 | path: / | permanent link to this entry

PyBlosxom works!!!

Finally seems like my blog is not junking up Planet India and I hope sankarshan and G0SUB wont be mad at me anymore regarding this, although its a seperate issue that they have many more things to be mad at me.

As usual the credit undoubtably goes to t3rmin4t0r for pointing me out the actual problem and also providing an appropriate fix.

The two things which I used for the fix are:
(a) t3min4t0r's hacked copy of pyfilemtime.py plugin for pyblosxom
(b) added lacking "<pubDate>$date $ti:00 $timezone</pubDate>" in my story.rss pointed out by t3min4t0r

posted at: 10:55 | path: / | permanent link to this entry

Made with PyBlosxom