diff --git a/maigret/maigret.py b/maigret/maigret.py index 5c25382..a591c65 100755 --- a/maigret/maigret.py +++ b/maigret/maigret.py @@ -254,6 +254,12 @@ def setup_arguments_parser(settings: Settings): default=settings.domain_search, help="Enable (experimental) feature of checking domains on usernames.", ) + parser.add_argument( + "--cloudflare-bypass", + action="store_true", + default=settings.cloudflare_bypass, + help="Enable Cloudflare bypass (edit settings.json to configure)", + ) filter_group = parser.add_argument_group( 'Site filtering', 'Options to set site search scope' diff --git a/maigret/resources/settings.json b/maigret/resources/settings.json index 82f90f7..3819354 100644 --- a/maigret/resources/settings.json +++ b/maigret/resources/settings.json @@ -54,5 +54,16 @@ "graph_report": false, "pdf_report": false, "html_report": false, - "web_interface_port": 5000 + "web_interface_port": 5000, + "cloudflare_bypass": { + "enabled": true, + "module": "cloudscraper", + "modules": [ + { + "name": "chrome_webgate", + "method": "url_rewrite", + "url": "http://localhost:8000/html?url={url}&retries=1" + } + ] + } } \ No newline at end of file diff --git a/tests/test_cli.py b/tests/test_cli.py index ca6a0e5..acc5321 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -45,6 +45,17 @@ DEFAULT_ARGS: Dict[str, Any] = { 'web': None, 'with_domains': False, 'xmind': False, + 'cloudflare_bypass': { + "enabled": False, + "module": "cloudscraper", + "modules": [ + { + "name": "chrome_webgate", + "method": "url_rewrite", + "url": "http://localhost:8000/html?url={url}&retries=1" + } + ] + } }