Skip to content

Update phishstats base URL Closes #3152#3247

Merged
mlodic merged 4 commits intointelowlproject:developfrom
NikhilRaikwar:fix-phishstats-url-clean
Jan 30, 2026
Merged

Update phishstats base URL Closes #3152#3247
mlodic merged 4 commits intointelowlproject:developfrom
NikhilRaikwar:fix-phishstats-url-clean

Conversation

@NikhilRaikwar
Copy link
Contributor

Description

Updated the PhishStats analyzer to use the new API base URL (https://api.phishstats.info/api/phishing) as the old URL (https://phishstats.info:2096/api) is no longer valid.

Changes include:

  • Updated the hardcoded default URL in PhishStats class.
  • Added a data migration (0171_phishstats_url.py) to add the url configuration parameter and set the new default value for existing configurations.
  • Updated test_phishstats.py to reflect the new API response structure (checking countrycode instead of country).

Closes #3152

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue).

Proof of Work

Sample Analysis Result (JSON)

{
    "api_url": "https://api.phishstats.info/api/phishing?_limit=1",
    "results": [
        {
            "id": 2,
            "url": "http://00000-00.000webhostapp.com/",
            "ip": "2a02:4780:dead:6c62::1",
            "countrycode": "US",
            "countryname": "United States",
            "regioncode": "NY",
            "regionname": "New York",
            "city": "New York",
            "zipcode": "10001",
            "latitude": "40.7128",
            "longitude": "-74.0060",
            "asn": "AS13335",
            "org": "Cloudflare, Inc.",
            "isp": "Cloudflare, Inc.",
            "date": "2021-10-01T12:00:00.000Z",
            "date_update": "2021-10-01T12:00:00.000Z",
            "score": null,
            "host": "00000-00.000webhostapp.com",
            "domain": "000webhostapp.com",
            "tld": "com",
            "domain_registered_n_days_ago": null,
            "screenshot": null,
            "abuse_contact": "[email protected]",
            "ssl_issuer": null,
            "ssl_subject": null,
            "rank_host": null,
            "rank_domain": null,
            "n_times_seen_ip": null,
            "n_times_seen_host": null,
            "n_times_seen_domain": null,
            "http_code": null,
            "http_server": null,
            "google_safebrowsing": null,
            "virus_total": null,
            "abuse_ch_malware": null,
            "vulns": null,
            "ports": null,
            "os": null,
            "tags": null,
            "technology": null,
            "page_text": "   ",
            "ssl_fingerprint": null
        }
    ]
}

Checklist

  • I have read and understood the rules about how to Contribute to this project
  • The pull request is for the branch develop
  • A new plugin (analyzer, connector, visualizer, playbook, pivot or ingestor) was added or changed, in which case:
    • I strictly followed the documentation "How to create a Plugin"
    • Usage file was updated. A link to the PR to the docs repo has been added as a comment here.
    • Advanced-Usage was updated (in case the plugin provides additional optional configuration). A link to the PR to the docs repo has been added as a comment here.
    • I have dumped the configuration from Django Admin using the dumpplugin command and added it in the project as a data migration. ("How to share a plugin with the community")
    • If a File analyzer was added and it supports a mimetype which is not already supported, you added a sample of that type inside the archive test_files.zip and you added the default tests for that mimetype in test_classes.py.
    • If you created a new analyzer and it is free (does not require any API key), please add it in the FREE_TO_USE_ANALYZERS playbook by following this guide.
    • Check if it could make sense to add that analyzer/connector to other freely available playbooks.
    • I have provided the resulting raw JSON of a finished analysis and a screenshot of the results.
    • If the plugin interacts with an external service, I have created an attribute called precisely url that contains this information. This is required for Health Checks (HEAD HTTP requests).
    • If a new analyzer has beed added, I have created a unittest for it in the appropriate dir. I have also mocked all the external calls, so that no real calls are being made while testing.
    • I have added that raw JSON sample to the get_mocker_response() method of the unittest class. This serves us to provide a valid sample for testing.
    • I have created the corresponding DataModel for the new analyzer following the documentation
  • I have inserted the copyright banner at the start of the file: # This file is a part of IntelOwl https://github.com/intelowlproject/IntelOwl # See the file 'LICENSE' for copying permission.
  • Please avoid adding new libraries as requirements whenever it is possible. Use new libraries only if strictly needed to solve the issue you are working for. In case of doubt, ask a maintainer permission to use a specific library.
  • If external libraries/packages with restrictive licenses were added, they were added in the Legal Notice section.
  • Linters (Black, Flake, Isort) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.
  • I have added tests for the feature/bug I solved (see tests folder). All the tests (new and old ones) gave 0 errors.
  • If the GUI has been modified:
    • I have a provided a screenshot of the result in the PR.
    • I have created new frontend tests for the new component or updated existing ones.
  • After you had submitted the PR, if DeepSource, Django Doctors or other third-party linters have triggered any alerts during the CI checks, I have solved those alerts.

Important Rules

  • If you miss to compile the Checklist properly, your PR won't be reviewed by the maintainers.
  • Everytime you make changes to the PR and you think the work is done, you should explicitly ask for a review by using GitHub's reviewing system detailed here.

@mlodic
Copy link
Member

mlodic commented Jan 29, 2026

Idk what happened again but it is impossible to see the changes, the diff shows that all the files are changed completely. Please adjust this otherwise it is impossible to review

@NikhilRaikwar NikhilRaikwar force-pushed the fix-phishstats-url-clean branch from dcbea43 to f9d1edf Compare January 29, 2026 20:32
@NikhilRaikwar NikhilRaikwar force-pushed the fix-phishstats-url-clean branch from f9d1edf to a85297b Compare January 29, 2026 20:42
@NikhilRaikwar
Copy link
Contributor Author

NikhilRaikwar commented Jan 29, 2026

Hey @mlodic — thanks for the heads-up earlier. I’ve cleaned up the branch now
All checks are passing (no noisy diffs anymore), commits are properly scoped, and the PR is ready for final review. Appreciate you taking another look!

@mlodic mlodic merged commit 612f987 into intelowlproject:develop Jan 30, 2026
9 checks passed
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.

2 participants