mirror of https://github.com/MISP/PyMISP
chg: [add_github_user] add ssh keys of the user in the MISP object
parent
e40b14e897
commit
0e0424fa30
|
@ -46,8 +46,11 @@ if __name__ == '__main__':
|
|||
followers = rfollowers.json()
|
||||
rfollowing = requests.get("https://api.github.com/users/{}/following".format(args.username))
|
||||
followings = rfollowing.json()
|
||||
rkeys = requests.get("https://api.github.com/users/{}/keys".format(args.username))
|
||||
keys = rkeys.json()
|
||||
misp_object.add_attributes("follower", *[follower['login'] for follower in followers])
|
||||
misp_object.add_attributes("following", *[following['login'] for following in followings])
|
||||
misp_object.add_attributes("ssh-public-key", *[sshkey['key'] for sshkey in keys])
|
||||
misp_object.add_attribute('bio', github_user['bio'])
|
||||
misp_object.add_attribute('link', github_user['html_url'])
|
||||
misp_object.add_attribute('user-fullname', github_user['name'])
|
||||
|
|
Loading…
Reference in New Issue