summaryrefslogtreecommitdiffstats
path: root/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'app.py')
-rw-r--r--app.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/app.py b/app.py
index ba29028..29ff502 100644
--- a/app.py
+++ b/app.py
@@ -41,8 +41,9 @@ class ScanHandler(tornado.web.RequestHandler):
out['results'].append({'raw': '* help - shows this help message'})
if cmd == 'nmap':
- logging.debug('SCANNING!')
- result = subprocess.check_output(['nmap', self.request.remote_ip])
+ host = self.request.headers.get('X-Real-IP', self.request.remote_ip)
+ logging.debug('SCANNING %s' % host)
+ result = subprocess.check_output(['nmap', host])
for r in re.finditer(r'(\d+/[a-z]{3})\s([a-z]+)\s+(.+)', result):
t = r.groups()
out['results'].append({