diff options
author | Filipp Lepalaan <f@230.to> | 2014-02-14 12:04:23 +0200 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2014-02-14 12:04:23 +0200 |
commit | b8bbae01544acce8c1e18d612dfb966170c6cfdc (patch) | |
tree | f218112dca2ef0a1f5314d958444b2eb90ad9864 | |
parent | d1e3944239eda8ce4d171b94234f3e3559186fa1 (diff) | |
download | intercheck-b8bbae01544acce8c1e18d612dfb966170c6cfdc.tar.gz intercheck-b8bbae01544acce8c1e18d612dfb966170c6cfdc.tar.bz2 intercheck-b8bbae01544acce8c1e18d612dfb966170c6cfdc.zip |
Fix running behind proxy
-rw-r--r-- | app.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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({ |