-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Social links module - mtg-bi.com #1142
Conversation
Update - 30/9
Update master 16-01-2021
modules/sfp_sociallinks.py
Outdated
"https://docs.osint.rest/" | ||
], | ||
'favIcon': "https://seon.io/assets/favicons/favicon-16x16.png", | ||
'logo': "https://seon.io/assets/favicons/apple-touch-icon-152.png", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy-paste error :)
modules/sfp_sociallinks.py
Outdated
|
||
# Option descriptions | ||
optdescs = { | ||
'api_key': "API Key for mtg-bi.com", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convention is <name> API Key.
modules/sfp_sociallinks.py
Outdated
'Authorization': self.opts['api_key'] | ||
} | ||
|
||
res = self.sf.fetchUrl( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a lot of code duplication in these query* functions. I suggest creating a generic query function and moving the common code there, then having the query* functions call that.
if resultSet.get('name'): | ||
humanNames.add(resultSet.get('name')) | ||
if resultSet.get('skypeId'): | ||
evt = SpiderFootEvent("USERNAME", resultSet.get('skypeId'), self.__name__, event) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be an ACCOUNT_EXTERNAL_OWNED
event instead - see the sfp_c99 module for how it reports Skype accounts.
|
||
if res['content'] is None: | ||
return None | ||
return json.loads(res['content']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to check for error codes.
modules/sfp_sociallinks.py
Outdated
return self.query(queryString) | ||
|
||
def queryFlickr(self, qry, eventName): | ||
if eventName == "EMAILADDR": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of these various query* calls which have a single if
statement checking the eventName
? If the function only takes one kind of event type, shouldn't the caller ensure that's what it's called with?
Codecov Report
@@ Coverage Diff @@
## master #1142 +/- ##
==========================================
- Coverage 50.78% 50.46% -0.32%
==========================================
Files 442 454 +12
Lines 35777 36511 +734
==========================================
+ Hits 18168 18424 +256
- Misses 17609 18087 +478
Continue to review full report at Codecov.
|
No description provided.