From 94be61a303127335eb39b26302392a0f237c3ac1 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Wed, 26 Jun 2019 16:44:55 +0200 Subject: Allow turning off cert validation Add --insecure switch (shamelessly stolen from CURL) to both, -grab and -irc. --- crocoite/cli.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'crocoite/cli.py') diff --git a/crocoite/cli.py b/crocoite/cli.py index cccf728..3294061 100644 --- a/crocoite/cli.py +++ b/crocoite/cli.py @@ -74,6 +74,9 @@ def single (): metavar='NAME', nargs='*') parser.add_argument('--warcinfo', help='Add extra information to warcinfo record', metavar='JSON', type=json.loads) + parser.add_argument('-k', '--insecure', + action='store_true', + help='Disable certificate validation') parser.add_argument('url', help='Website URL', type=URL, metavar='URL') parser.add_argument('output', help='WARC filename', metavar='FILE') @@ -85,7 +88,11 @@ def single (): service = Process () if args.browser: service = Passthrough (args.browser) - settings = ControllerSettings (idleTimeout=args.idleTimeout, timeout=args.timeout) + settings = ControllerSettings ( + idleTimeout=args.idleTimeout, + timeout=args.timeout, + insecure=args.insecure, + ) with open (args.output, 'wb') as fd, WarcHandler (fd, logger) as warcHandler: logger.connect (WarcHandlerConsumer (warcHandler)) handler = [StatsHandler (), LogHandler (logger), warcHandler] -- cgit v1.2.3