From de7e367e1c74940317a1188f44c72547f6dec837 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Thu, 13 Feb 2014 16:23:12 +0200 Subject: Switching workstations --- app.py | 4 ++++ index.html | 40 ++++++++++++++++++++++++---------------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/app.py b/app.py index b5c092a..79b3fa9 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,5 @@ import re +import logging import subprocess import tornado.ioloop import tornado.web @@ -14,6 +15,7 @@ class MainHandler(tornado.web.RequestHandler): class ScanHandler(tornado.web.RequestHandler): def get(self): + logging.debug('SCANNING!') result = subprocess.check_output(['nmap', self.request.remote_ip]) for r in re.finditer(r'(\d+/[a-z]{3})\s([a-z]+)\s+(.+)', result): t = r.groups() @@ -27,4 +29,6 @@ application = tornado.web.Application([ if __name__ == '__main__': application.listen(8888) + logging.basicConfig(level=logging.DEBUG) + logging.debug('intercheck ready for action...') tornado.ioloop.IOLoop.instance().start() diff --git a/index.html b/index.html index 89cb1f5..134bbf2 100644 --- a/index.html +++ b/index.html @@ -1,19 +1,27 @@ - - intercheck 0.001 - - - - -{% block main %} -
- -
-{% end %} - + + intercheck 0.001 + + + + + + +
+ -- cgit v1.2.3