PyMISP/examples/delete_user.py

17 lines
635 B
Python
Raw Permalink Normal View History

2016-11-03 11:23:48 +01:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
2019-07-17 16:46:47 +02:00
from pymisp import ExpandedPyMISP
from keys import misp_url, misp_key, misp_verifycert
2016-11-03 11:23:48 +01:00
import argparse
if __name__ == '__main__':
2020-10-01 13:45:29 +02:00
parser = argparse.ArgumentParser(description='Delete the user with the given id. Keep in mind that disabling users (by setting the disabled flag via an edit) is always preferred to keep user associations to events intact.')
2016-11-03 11:23:48 +01:00
parser.add_argument("-i", "--user_id", help="The id of the user you want to delete.")
args = parser.parse_args()
2019-07-17 16:46:47 +02:00
misp = ExpandedPyMISP(misp_url, misp_key, misp_verifycert)
2016-11-03 11:23:48 +01:00
print(misp.delete_user(args.user_id))