branch develop updated (5b34f6f -> f5f2cea)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository mum. See http://git.chorem.org/mum.git from 5b34f6f added try/catch blocks on xml nmap parsing new f5f2cea running nmap without root privileges will raise an error The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit f5f2cea615af78b200afcb5b7dd9a02831a9858b Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Thu May 7 15:36:05 2015 +0200 running nmap without root privileges will raise an error Summary of changes: app/mum.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit f5f2cea615af78b200afcb5b7dd9a02831a9858b Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Thu May 7 15:36:05 2015 +0200 running nmap without root privileges will raise an error --- app/mum.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/mum.py b/app/mum.py index 8e2899e..fbee41a 100755 --- a/app/mum.py +++ b/app/mum.py @@ -10,6 +10,7 @@ import json import threading from module_loader import ModuleLoader import argparse +import os # To Launch the nmap detection with a new thread class ThreadDetect(threading.Thread): @@ -127,7 +128,11 @@ def receive(ws): msg = json.loads(response) for code in msg: if code == "NMAP_SCAN_DEMAND": # asked from scan page - start_first_detection(msg["NMAP_SCAN_DEMAND"], ml, ws) + if os.getegid() != 0: + print "Error: Cannot run nmap without root privileges." + ws.send(json.dumps({"ERROR": "Nmap needs to be root to be executed."})) + else: + start_first_detection(msg["NMAP_SCAN_DEMAND"], ml, ws) elif code == "CREATE_EMPTY_HOST": # asked from scan page ml.create_empty_host(msg["CREATE_EMPTY_HOST"]) ws.send(json.dumps({"SUCCESS_MODULE": "Creation of new host"})) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm