A Python-based tool that automates the verification of domains against MetaMask's phishing detection lists. It classifies domains into allowlist
, blocklist
, fuzzylist
, or unknown
based on the latest data from MetaMask's API.
- Automated List Retrieval: Fetches the latest
allowlist
,blocklist
, andfuzzylist
from MetaMask's phishing detection API. - Domain Classification: Analyzes input URLs and classifies their top-level domains accordingly.
- Fuzzy Matching: Implements approximate string matching to identify domains similar to known phishing sites.
- Batch Processing: Supports processing multiple URLs efficiently.
- Python 3.7 or higher
- Required Python Packages:
requests
tldextract
difflib
(standard library)
-
Clone the Repository:
git clone https://github.com/yourusername/phishing-domain-checker.git cd phishing-domain-checker
-
Create a Virtual Environment (Optional but Recommended):
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Prepare Your List of URLs: Create a text file (e.g.,
urls.txt
) containing one URL per line. -
Run the Script:
python phishing_checker.py urls.txt
-
View Results: The script will output the classification for each URL in the console.
Given an urls.txt
file with the following content:
https://opensea.io
https://cryptokitties.co
https://cham-transfers.com
https://unknownsite.example
Running the script will yield:
https://opensea.io: allowlist
https://cryptokitties.co: fuzzylist
https://cham-transfers.com: blocklist
https://unknownsite.example: unknown
Contributions are welcome! Please fork the repository and submit a pull request with your enhancements.
This project is licensed under the MIT License.
To set up the repository locally:
-
Clone the Repository:
git clone https://github.com/yourusername/phishing-domain-checker.git cd phishing-domain-checker
-
Create a Virtual Environment:
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Prepare Your URLs File: Create a text file named
urls.txt
and list the URLs you want to check, one per line. -
Run the Script:
python phishing_checker.py urls.txt
-
Review the Output: The script will display the classification results for each URL in the console.