-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgetAllEmployees.py
21 lines (17 loc) · 1.11 KB
/
getAllEmployees.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from MaltegoTransform import *
from nqntnqnqmb import *
import random
with open('./config.json') as config_file:
config = random.choice(json.load(config_file))
trx = MaltegoTransform()
companySearch=sys.argv[1].split("company/")[1].replace("/","")
employee = getAllEmployees(companySearch,config["JSESSIONID"],config["li_at"])
for employe in employee:
name = employe["firstname"] + " " + employe["lastname"]
linkedinProfileEntitie = trx.addEntity("megadose.LinkedinProfile", ''.join(random.choice(string.ascii_lowercase) for i in range(49)))
linkedinProfileEntitie.addProperty(fieldName="Name",value=name)
linkedinProfileEntitie.addProperty(fieldName="Occupation",value=str(employe["occupation"]).replace("&","&"))
linkedinProfileEntitie.addProperty(fieldName="Linkedin.Profile.Url",value=str(employe["profile-url"]).replace("&","&"))
linkedinProfileEntitie.addProperty(fieldName="Random",value=str(''.join(random.choice(string.ascii_lowercase) for i in range(49))).replace("&","&"))
linkedinProfileEntitie.setIconURL(employe["picture-url"].replace("&","&"))
print(trx.returnOutput())