From 13995e1eca4fc18c784a6166c228c5924cecee44 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Wed, 16 Sep 2020 21:40:34 +0200 Subject: [PATCH] chg: [add_github_user] add following to the MISP object --- examples/add_github_user.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/add_github_user.py b/examples/add_github_user.py index b9c9f72..ef6005e 100755 --- a/examples/add_github_user.py +++ b/examples/add_github_user.py @@ -44,8 +44,10 @@ if __name__ == '__main__': github_user = r.json() rfollowers = requests.get(github_user['followers_url']) followers = rfollowers.json() - user_followers = [] + rfollowing = requests.get("https://api.github.com/users/{}/following".format(args.username)) + followings = rfollowing.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_attribute('bio', github_user['bio']) misp_object.add_attribute('link', github_user['html_url']) misp_object.add_attribute('user-fullname', github_user['name'])