Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main():
"""
program main
"""
config_file = resilient.get_config_file()
parser = ExampleArgumentParser(config_file)
opts = parser.parse_args()
inc_types = opts["itype"]
inc_queue = opts["queue"]
# Create SimpleClient for a REST connection to the Resilient services
client = resilient.get_client(opts)
# Discovered Date will be set to the current time
time_now = int(time.time() * 1000)
try:
uri = '/incidents'
rf_config = configparser.ConfigParser()
def main():
"""
program main
"""
config_file = resilient.get_config_file()
parser = ExampleArgumentParser(config_file)
opts = parser.parse_args()
inc_types = opts["itype"]
inc_limit = opts["limit"]
# Create SimpleClient for a REST connection to the Resilient services
client = resilient.get_client(opts)
# Discovered Date will be set to the current time
time_now = int(time.time() * 1000)
try:
uri = '/incidents'
rf_config = configparser.ConfigParser()
def __init__(self, config_file=None):
self.config_file = config_file or resilient.get_config_file()
super(OptParser, self).__init__(config_file=self.config_file)
#
# Note this is a trick used by resilient-circuits. resilient.ArgumentParser will
# validate the arguments of the command line. Since we use command line
# argument of input/output files, we don't want that validation, so we
# erase them before we call parse_args(). So parse_args() only
# reads from app.config
#
sys.argv = sys.argv[0:1]
self.opts = self.parse_args()
if self.config:
for section in self.config.sections():
#
# Handle sections other than [resilient] in app.config
#