Skip to content
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

Merged
merged 13 commits into from
Mar 22, 2021
Merged

Conversation

krishnasism
Copy link
Contributor

No description provided.

"https://docs.osint.rest/"
],
'favIcon': "https://seon.io/assets/favicons/favicon-16x16.png",
'logo': "https://seon.io/assets/favicons/apple-touch-icon-152.png",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy-paste error :)


# Option descriptions
optdescs = {
'api_key': "API Key for mtg-bi.com",
Copy link
Owner

@smicallef smicallef Feb 28, 2021

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.

'Authorization': self.opts['api_key']
}

res = self.sf.fetchUrl(
Copy link
Owner

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)
Copy link
Owner

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.

@krishnasism krishnasism changed the title Social links module - mtg-bi.com Social links module - mtg-bi.com . Mar 1, 2021
@krishnasism krishnasism changed the title Social links module - mtg-bi.com . Social links module - mtg-bi.com Mar 1, 2021

if res['content'] is None:
return None
return json.loads(res['content'])
Copy link
Owner

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.

return self.query(queryString)

def queryFlickr(self, qry, eventName):
if eventName == "EMAILADDR":
Copy link
Owner

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-io
Copy link

codecov-io commented Mar 13, 2021

Codecov Report

Merging #1142 (0e4eadb) into master (4ffad6a) will decrease coverage by 0.31%.
The diff coverage is 22.82%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
spiderfoot/db.py 75.30% <ø> (ø)
modules/sfp_sociallinks.py 14.09% <14.09%> (ø)
test/unit/modules/test_sfp_sociallinks.py 60.00% <60.00%> (ø)
modules/sfp_pageinfo.py 32.35% <0.00%> (-3.14%) ⬇️
modules/sfp_shodan.py 18.37% <0.00%> (-1.63%) ⬇️
modules/sfp_s3bucket.py 22.12% <0.00%> (-0.40%) ⬇️
modules/sfp_binaryedge.py 13.18% <0.00%> (-0.15%) ⬇️
sfcli.py 31.18% <0.00%> (ø)
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ffad6a...0e4eadb. Read the comment docs.

@smicallef smicallef merged commit 0762311 into smicallef:master Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants