AssuranceMaladieSec / CertStreamMonitor

Monitor certificates generated for specific domain strings and associated, store data into sqlite3 database, alert you when sites come online.
GNU General Public License v3.0
136 stars 30 forks source link

unexpected keyword argument 'http_proxy_host #26

Closed DannyCork closed 4 years ago

DannyCork commented 4 years ago

my conf/example.conf looks like this...

[SEARCH]
# Keywords to look for (with '|' (or) as separator)
SearchKeywords = .ie

# Minimum number of SearchKeywords detected in a hostname before writing it to DB. If you choose to set it to 2,
# the tool needs to detect 2 SearchKeywords matchs to write the match hostname to DB.
# Under 2 matching SearchKeywords but above 0, the matching hostname will only be logged to the log file.
DetectionThreshold = 1

I start execution ./CertStreamMonitor.py -c conf/example.conf

and get this exception straight away

$ ./CertStreamMonitor.py -c conf/example.conf
Looking for these strings: .ie, detection threshold: 1
 Main error (<class 'TypeError'>, TypeError("listen_for_events() got an unexpected keyword argument 'http_proxy_host'",), <traceback object at 0x7fd682ad4b08>)

I don't use a proxy so I have none specified in the config but it looks like CertStream wants a proxy?

Any help appreciated. thanks.

t4d commented 4 years ago

Hi, thank you for the issue. From my point of view it works well with your configuration options and without any proxy declared, on a fresh install.

$ ./CertStreamMonitor.py -c conf/example.conf Looking for these strings: .ie, detection threshold: 1 Connection established to CertStream! Listening for events... [2019-11-20T16:30:10] gmcapi.carpediemsrl.net (SAN: ) (Issuer: /C=US/CN=Let's Encrypt Authority X3/O=Let's Encrypt) (Fingerprint: 5A:2C:E0:D2:32:C3:60:57:2E:49:E6:06:C7:63:C9:07:91:30:1A:B3) (StartTime: 2019-11-20T14:29:51) [2019-11-20T16:30:10] snackkoerier-backend.productie.k8s.hoppinger.com (SAN: ) (Issuer: /C=US/CN=Let's Encrypt Authority X3/O=Let's Encrypt) (Fingerprint: 2A:5F:C4:14:BD:8E:69:14:2E:62:C9:CD:C3:A0:95:84:9D:DA:2C:35) (StartTime: 2019-11-20T14:29:51) [2019-11-20T16:30:10] *.derefferie.be (SAN: ) (Issuer: /C=US/CN=Let's Encrypt Authority X3/O=Let's Encrypt) (Fingerprint: 1D:0C:0A:A4:39:F9:08:7F:71:28:4F:A9:4B:00:5B:53:B6:4A:E1:B2) (StartTime: 2019-11-20T14:29:50) [2019-11-20T16:30:10] derefferie.be (SAN: ) (Issuer: /C=US/CN=Let's Encrypt Authority X3/O=Let's Encrypt) (Fingerprint: 1D:0C:0A:A4:39:F9:08:7F:71:28:4F:A9:4B:00:5B:53:B6:4A:E1:B2) (StartTime: 2019-11-20T14:29:50) [2019-11-20T16:30:11] vpn.familie-gerono.de (SAN: ) (Issuer: /C=US/CN=Let's Encrypt Authority X3/O=Let's Encrypt) (Fingerprint: 24:BE:34:4C:B2:60:0A:D8:7E:4B:32:19:C7:85:85:CB:E9:C6:99:BF) (StartTime: 2019-11-20T14:29:53) [2019-11-20T16:30:12] *.pensionsauthority.ie (SAN: ) (Issuer: /C=US/CN=DigiCert SHA2 Secure Server CA/O=DigiCert Inc) (Fingerprint: 23:F7:F4:33:61:DF:39:BC:9C:62:51:25:57:6B:4D:D0:27:39:FD:49) (StartTime: 2019-11-20T00:00:00) [2019-11-20T16:30:12] pensionsauthority.ie (SAN: ) (Issuer: /C=US/CN=DigiCert SHA2 Secure Server CA/O=DigiCert Inc) (Fingerprint: 23:F7:F4:33:61:DF:39:BC:9C:62:51:25:57:6B:4D:D0:27:39:FD:49) (StartTime: 2019-11-20T00:00:00) Can you try to update your certstream python package (the last version should be 1.10)? $ pip install -U certstream

P.S.: If your looking particularly for .ie TLD you can use \.ie as regex

DannyCork commented 4 years ago

Thanks fot the .ie regex tip!

I ran a pip update

$ pip install -U certstream
Collecting certstream
Collecting websocket-client==0.48.0 (from certstream)
  Using cached https://files.pythonhosted.org/packages/8a/a1/72ef9aa26cfe1a75cee09fc1957e4723add9de098c1571
9416a1ee89386b/websocket_client-0.48.0-py2.py3-none-any.whl
Collecting termcolor (from certstream)
Collecting six (from websocket-client==0.48.0->certstream)
  Using cached https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl
Installing collected packages: six, websocket-client, termcolor, certstream
Successfully installed certstream-1.10 six-1.13.0 termcolor-1.1.0 websocket-client-0.48.0

however I got the same error

$./CertStreamMonitor.py -c conf/example.conf
Looking for these strings: \.ie, detection threshold: 1
 Main error (<class 'TypeError'>, TypeError("listen_for_events() got an unexpected keyword argument 'http_proxy_host'",), <traceback object at 0x7f83bca7e608>)

I'm running Phython 3.6 btw. I will try on a clean vm and get back to you.

Thanks.

DannyCork commented 4 years ago

you are correct, this was a local problem. After playing around with pip and pip3 I was able to resolve the problem.

Many thanks.