diff --git a/scapy/base_classes.py b/scapy/base_classes.py
index 62997889affff2fcd4358032b5c9e583445cc1e2..8cd7e19b005befeda5afb7fb5a2fa4e5da74bad6 100644
--- a/scapy/base_classes.py
+++ b/scapy/base_classes.py
@@ -77,7 +77,8 @@ class Net(Gen):
         self.repr=net
         self.parsed,self.netmask = self._parse_net(net)
 
-
+    def __str__(self):
+        return self.repr
                                                                                                
     def __iter__(self):
         for d in xrange(*self.parsed[3]):
diff --git a/scapy/layers/inet.py b/scapy/layers/inet.py
index 54fffc481adb5c3627c060080f6884ba6ed99ecd..a6c4eb39400f69b2072ba4ebbdf9f3a7e4ff67df 100644
--- a/scapy/layers/inet.py
+++ b/scapy/layers/inet.py
@@ -16,6 +16,7 @@ from scapy.base_classes import Gen
 from scapy.data import *
 from scapy.layers.l2 import *
 from scapy.config import conf
+from scapy.consts import WINDOWS
 from scapy.fields import *
 from scapy.packet import *
 from scapy.volatile import *
@@ -23,6 +24,7 @@ from scapy.sendrecv import sr,sr1,srp1
 from scapy.plist import PacketList,SndRcvList
 from scapy.automaton import Automaton,ATMT
 from scapy.error import warning
+from scapy.utils import whois
 
 import scapy.as_resolvers
 
@@ -36,7 +38,11 @@ class IPTools(object):
     """Add more powers to a class with an "src" attribute."""
     __slots__ = []
     def whois(self):
-        os.system("whois %s" % self.src)
+        """whois the source and print the output"""
+        if WINDOWS:
+            print whois(self.src)
+        else:
+            os.system("whois %s" % self.src)
     def ottl(self):
         t = [32,64,128,255]+[self.ttl]
         t.sort()
diff --git a/scapy/utils.py b/scapy/utils.py
index c163cfdc3c8fd21701df23722ccf82801ba862dc..34c78dd463f8c9d78e8d61e4134ab4ac5b16a484 100644
--- a/scapy/utils.py
+++ b/scapy/utils.py
@@ -7,10 +7,10 @@
 General utility functions.
 """
 
-import os,sys,socket,types
-import random,time
-import gzip,zlib,cPickle
-import re,struct,array
+import os, sys, socket, types
+import random, time
+import gzip, zlib, cPickle
+import re, struct, array
 import subprocess
 import tempfile
 
@@ -1275,3 +1275,34 @@ def make_lined_table(*args, **kargs):
 def make_tex_table(*args, **kargs):
     __make_table(lambda l: "%s", lambda l: "& %s", "\\\\", seplinefunc=lambda a,x:"\\hline", *args, **kargs)
 
+###############################################
+### WHOIS CLIENT (not available on windows) ###
+###############################################
+
+def whois(ip_address):
+    """Whois client for Python"""
+    whois_ip = str(ip_address)
+    try:
+        query = socket.gethostbyname(whois_ip)
+    except:
+        query = whois_ip
+    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+    s.connect(("whois.ripe.net", 43))
+    s.send(query + "\r\n")
+    answer = ''
+    while True:
+        d = s.recv(4096)
+        answer += d
+        if not d:
+            break
+    s.close()
+    ignore_tag = "remarks:"
+    # ignore all lines starting with the ignore_tag
+    lines = [ line for line in answer.split("\n") if not line or (line and not line.startswith(ignore_tag))]
+    # remove empty lines at the bottom
+    for i in range(1, len(lines)):
+        if not lines[-i].strip():
+            del lines[-i]
+        else:
+            break
+    return "\n".join(lines[3:])