Blob Blame History Raw
diff -up ./roca/detect.py.color ./roca/detect.py
--- ./roca/detect.py.color	2018-03-02 09:29:08.000000000 -0500
+++ ./roca/detect.py	2018-09-10 13:31:01.730876815 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3 -s
 # -*- coding: utf-8 -*-
 
 """
@@ -43,7 +43,10 @@ from functools import reduce
 import json
 import argparse
 import logging
-import coloredlogs
+try:
+  import coloredlogs
+except:
+  coloredlogs = None
 import base64
 import hashlib
 import sys
@@ -62,8 +65,17 @@ from math import ceil, log
 LOG_FORMAT = '%(asctime)s [%(process)d] %(levelname)s %(message)s'
 
 
+
 logger = logging.getLogger(__name__)
-coloredlogs.install(level=logging.INFO, fmt=LOG_FORMAT)
+if coloredlogs:
+  coloredlogs.install(level=logging.INFO, fmt=LOG_FORMAT)
+else:
+  logging.basicConfig(
+	  stream=sys.stdout,
+	  level=logging.INFO,
+	  format='%(asctime)s %(message)s',
+	  datefmt='%Y%b%d %H:%M:%S'
+  )
 
 
 #
@@ -2242,7 +2254,7 @@ class RocaFingerprinter(object):
         parser = self.init_parser()
         self.args = parser.parse_args()
 
-        if self.args.debug:
+        if self.args.debug and coloredlogs:
             coloredlogs.install(level=logging.DEBUG, fmt=LOG_FORMAT)
 
         self.work()
diff -up ./roca/detect_tls.py.color ./roca/detect_tls.py
--- ./roca/detect_tls.py.color	2018-03-02 09:29:08.000000000 -0500
+++ ./roca/detect_tls.py	2018-09-10 13:32:52.850351651 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3 -s
 # -*- coding: utf-8 -*-
 
 """
@@ -21,7 +21,6 @@ Script requirements:
 import sys
 import argparse
 import logging
-import coloredlogs
 from ssl import get_server_certificate
 from roca.detect import RocaFingerprinter
 
@@ -151,7 +150,16 @@ class RocaTLSFingerprinter(object):
         Init command line parser
         :return:
         """
-        parser = argparse.ArgumentParser(description='ROCA TLS Fingerprinter')
+        parser = argparse.ArgumentParser(
+            formatter_class=argparse.RawDescriptionHelpFormatter,
+            description='''ROCA TLS Fingerprinter
+
+Reads from one or more text files that contain a newline-separated list of
+address:port entries. Example:
+
+    github.com:443
+    google.com:443
+    internal.example.com:8080''')
 
         parser.add_argument('--debug', dest='debug', default=False, action='store_const', const=True,
                             help='Debugging logging')
@@ -187,7 +195,6 @@ class RocaTLSFingerprinter(object):
         self.roca.args.indent = self.args.indent
 
         if self.args.debug:
-            coloredlogs.install(level=logging.DEBUG)
             self.roca.args.debug = True
 
         self.work()
diff -up ./setup.py.color ./setup.py
--- ./setup.py.color	2018-03-02 09:29:08.000000000 -0500
+++ ./setup.py	2018-09-10 13:31:01.727876775 -0400
@@ -8,10 +8,8 @@ version = '1.2.12'
 # Please update tox.ini when modifying dependency version requirements
 install_requires = [
     'cryptography>=1.2.3',
-    'setuptools>=1.0',
     'six',
     'future',
-    'coloredlogs',
     'pgpdump',
     'python-dateutil',
 ]