@@ 1,21 1,10 @@
-import random
-import string
import sys
+import uuid
-def create_id(itype):
- # lenghts for generating random strings for the id
- l1 = 8
- l2 = 4
- l3 = 12
+# use uuid format! very important to avoid issues
+myuuid = uuid.uuid4()
- chars = string.ascii_letters + string.digits
- random_string_1 = ''.join(random.choice(chars) for i in range(l1))
- random_string_2 = ''.join(random.choice(chars) for i in range(l2))
- random_string_3 = ''.join(random.choice(chars) for i in range(l2))
- random_string_4 = ''.join(random.choice(chars) for i in range(l2))
- random_string_5 = ''.join(random.choice(chars) for i in range(l3))
+# type could be malware, indicator, etc
+type_ = sys.argv[1]
- print(itype+"--"+random_string_1+"-"+random_string_2+"-"+random_string_3+"-"+random_string_4+"-"+random_string_5)
-
-# read argument from command to check the type
-create_id(str(sys.argv[1]))
+print(type_+"--"+str(myuuid))