Playing Around With Django
(On Ubuntu that is...)
Many thanks to sorcerer guru low for introducing me with Django. And thanks to Wei Sun too for reminding me on the Django meet-up presentation last Wednesday. Really appreciate all the efforts. Sorry guys for I cannot make it last time due to the time which belong to mine already populated with my own IPBrick presentation for the big boss.
Anyway, since I have several dreams on setting up shopping carts website somewhere in near future, perhaps I can use Django as the trial platform to realize my dream by start to write some web apps for the site.
So, let get on with this thing.
Following the installation instructions on Django project website (okay.. click here) and continue with getting the database to running so that I can start write my very first code. Very easy to install and configure straight away from the package on average Ubuntu machine. Once command python manage.py runserver 8000 & (default port) invoked, check the 127.0.0.1:8000 with any preferred browser to check if there are any error coming up.
If got something like this:
Then, we good to go.
Port 8000 eh? Makes me thinking if this command will start opening port port 8000 on my system, I then launch nmap localhost and I got this:
Starting Nmap 4.20 ( http://insecure.org ) at 2007-12-29 13:38 MYT Interesting ports on penguin (127.0.0.1): Not shown: 1695 closed ports PORT STATE SERVICE 8000/tcp open http-alt
And also some message from the puking console detailing some connection reset by peer error from the http-alt logs:
Exception happened during processing of request from ('127.0.0.1', 49875) Traceback (most recent call last): File "SocketServer.py", line 222, in handle_request self.process_request(request, client_address) File "SocketServer.py", line 241, in process_request self.finish_request(request, client_address) File "SocketServer.py", line 254, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python2.5/site-packages/django/core/servers/basehttp.py", line 537, in __init__ BaseHTTPRequestHandler.__init__(self, *args, **kwargs) File "SocketServer.py", line 522, in __init__ self.handle() File "/usr/lib/python2.5/site-packages/django/core/servers/basehttp.py", line 577, in handle self.raw_requestline = self.rfile.readline() File "socket.py", line 346, in readline data = self._sock.recv(self._rbufsize) error: (104, 'Connection reset by peer') ---------------------------------------- ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 51913) Traceback (most recent call last): File "SocketServer.py", line 222, in handle_request self.process_request(request, client_address) File "SocketServer.py", line 241, in process_request self.finish_request(request, client_address) File "SocketServer.py", line 254, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python2.5/site-packages/django/core/servers/basehttp.py", line 537, in __init__ BaseHTTPRequestHandler.__init__(self, *args, **kwargs) File "SocketServer.py", line 522, in __init__ self.handle() File "/usr/lib/python2.5/site-packages/django/core/servers/basehttp.py", line 577, in handle self.raw_requestline = self.rfile.readline() File "socket.py", line 346, in readline data = self._sock.recv(self._rbufsize) error: (104, 'Connection reset by peer') ----------------------------------------
So, thats how the nmap scanning logged by the http-alt active service. Next, scanning from remote machine outside the LAN shows this:
Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2007-12-29 12:12 MYT Initiating SYN Stealth Scan against XX.xx.101.51 [1660 ports] at 12:12 SYN Stealth Scan Timing: About 17.77% done; ETC: 12:15 (0:02:19 remaining) The SYN Stealth Scan took 167.25s to scan 1660 total ports. Warning: OS detection will be MUCH less reliable because we did not find at least 1 open and 1 closed TCP port Host XX.xx.101.51 appears to be up ... good. All 1660 scanned ports on XX.xx.101.51 are: filtered Too many fingerprints match this host to give specific OS details TCP/IP fingerprint: SInfo(V=3.70%P=i386-redhat-linux-gnu%D=12/29%Time=4775C9DE%O=-1%C=-1) T5(Resp=N) T6(Resp=N) T7(Resp=N) PU(Resp=N)
Nmap run completed -- 1 IP address (1 host up) scanned in 188.370 seconds
That is cool. Lessening my paranoid thought. Never mind the outdated version of nmap. Yeah, kudos to Fyodor for bring the open community some very fine tool available since the existence of the Net (and porn too).
Will continue more next blog since I need to dive in again plundering the docs after lunch. And today too hot, but strong winds outside. Feel like summer in memories with plus hotness added.
Good thing, my first wages coming in already. Woohoo!!
|