Skip to content

Commit

Permalink
Added debugging and baseurl funtionality, Related to CrowdStrike#1181
Browse files Browse the repository at this point in the history
  • Loading branch information
okewoma committed Jul 10, 2024
1 parent c1154b2 commit 9439e93
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions samples/authentication/token_authentication_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@
This sample should run using any version of FalconPy and requires the colorama and click libraries.
"""
import logging
import os
import click
import colorama
from argparse import ArgumentParser, RawTextHelpFormatter, Namespace
from falconpy import (
CloudConnectAWS,
Detects,
Expand All @@ -54,6 +56,20 @@
BOLD = colorama.Style.BRIGHT
ENDMARK = colorama.Style.RESET_ALL

def consume_arguments() -> Namespace:
parser = ArgumentParser(description=__doc__, fromatter_class=RawTextHelpFormatter)
parser.add_argument("-d", "--debug",
help="Enable API debugging",
action="store_true",
default=False
)
parser.add_argument("-b", "--base-url",
dest="base_url",
help="CrowdStrike cloud region. (auto or usgov1, Default: auto)",
required=False,
default="auto"
)
return parser.parse_args

# ### BEGIN token simulation
def get_token():
Expand Down

0 comments on commit 9439e93

Please sign in to comment.