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

ipapi.com module #1138

Merged
merged 11 commits into from
Feb 26, 2021
Merged

ipapi.com module #1138

merged 11 commits into from
Feb 26, 2021

Conversation

krishnasism
Copy link
Contributor

No description provided.

Co-authored-by: bcoles <bcoles@gmail.com>
@codecov-io
Copy link

codecov-io commented Feb 1, 2021

Codecov Report

Merging #1138 (ee86917) into master (4ffad6a) will decrease coverage by 0.01%.
The diff coverage is 43.82%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1138      +/-   ##
==========================================
- Coverage   50.78%   50.76%   -0.02%     
==========================================
  Files         442      444       +2     
  Lines       35777    35892     +115     
==========================================
+ Hits        18168    18220      +52     
- Misses      17609    17672      +63     
Impacted Files Coverage Δ
modules/sfp_ipapicom.py 33.33% <33.33%> (ø)
test/unit/modules/test_sfp_ipapicom.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%) ⬇️
test/unit/spiderfoot/test_spiderfootdb.py 96.12% <0.00%> (+1.73%) ⬆️

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...ee86917. Read the comment docs.


if self.opts['api_key'] == "":
self.sf.error("You enabled sfp_ipapicom but did not set an API key!")
self.errorState = True
Copy link
Owner

Choose a reason for hiding this comment

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

errorState is set but not checked.


if data.get('country_name'):
location = ', '.join(filter(None, [data.get('city'), data.get('region_name'), data.get('region_code'), data.get('country_name'), data.get('country_code')]))
location += f"\n-Latitude: {data.get('latitude')}\n-Longitude: {data.get('longitude')}"
Copy link
Owner

Choose a reason for hiding this comment

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

Lat/Lon should be reported separately as PHYSICAL_COORDINATES.

self.errorState = True
return None

if self.errorState:
Copy link
Owner

Choose a reason for hiding this comment

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

This check should be before the above if block, since otherwise an error log will be generated for every event received.

@smicallef smicallef merged commit c91c9e4 into smicallef:master Feb 26, 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.

4 participants