Skip to content

Commit

Permalink
Update nmap.py
Browse files Browse the repository at this point in the history
  • Loading branch information
galkan committed Oct 3, 2014
1 parent 137b75f commit b73c05e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/nmap.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

try:
import re
import os
import sys
import tempfile
import subprocess
except ImportError, err:
import sys
sys.stdout.write("%s\n" %err)
sys.exit(1)
from lib.core.exceptions import CrowbarExceptions
except Exception, err:
raise CrowbarExceptions(str(err))


class Nmap:
Expand All @@ -18,8 +18,8 @@ def __init__(self):
self.nmap_path = "/usr/bin/nmap"

if not os.path.exists(self.nmap_path):
print >> sys.stderr, "File: %s doesn't exists !!!"% self.nmap_path
sys.exit(1)
mess = "File: %s doesn't exists !!!"% self.nmap_path
raise CrowbarExceptions(mess)


def port_scan(self, ip_list, port):
Expand All @@ -43,4 +43,4 @@ def port_scan(self, ip_list, port):

return result



0 comments on commit b73c05e

Please sign in to comment.