Minor refactoring of the main script

This commit is contained in:
jvoisin 2016-07-05 01:30:16 +02:00
commit 86fb1ab328

View file

@ -14,14 +14,10 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
import optparse import optparse
import socket
import time
import settings
import ssl import ssl
from SocketServer import TCPServer, UDPServer, ThreadingMixIn, StreamRequestHandler, BaseRequestHandler, BaseServer from SocketServer import TCPServer, UDPServer, ThreadingMixIn
from threading import Thread from threading import Thread
from utils import * from utils import *
@ -45,8 +41,7 @@ options, args = parser.parse_args()
if not os.geteuid() == 0: if not os.geteuid() == 0:
print color("[!] Responder must be run as root.") print color("[!] Responder must be run as root.")
sys.exit(-1) sys.exit(-1)
elif options.OURIP is None and IsOsX() is True:
if options.OURIP is None and IsOsX() is True:
print "\n\033[1m\033[31mOSX detected, -i mandatory option is missing\033[0m\n" print "\n\033[1m\033[31mOSX detected, -i mandatory option is missing\033[0m\n"
parser.print_help() parser.print_help()
exit(-1) exit(-1)