Updating the Readme file with the correct information

This commit is contained in:
Alicja 2024-05-31 23:04:52 +02:00
parent 9cc671bc76
commit 8909c2c361

View File

@ -1,3 +1,76 @@
# PhishGuardian
PhishGuardian - Keep you e-mails safe!
PhishGuardian is a browser extension designed to detect and manage phishing emails. It uses machine learning to identify potential phishing emails and provides options to mark them as safe or move them to the trash. The extension is built using Flask for the backend and JavaScript for the frontend.
## Features
- Detects phishing emails using machine learning
- Allows users to mark emails as safe
- Allows users to move phishing emails to the trash
- Provides notifications for detected phishing emails
## Installation
### Prerequisites
- Python 3.6+
- Flask
- scikit-learn
- Chrome browser
### Backend Setup
1. Clone the repository:
```sh
git clone https://your-repository-url
cd PhishGuardian/backend
```
2. Install the required Python packages:
```sh
pip install -r requirements.txt
```
3. Run the Flask backend:
```sh
python backend.py
```
### Extension Setup
1. Open Chrome and go to `chrome://extensions/`
2. Enable "Developer mode" by toggling the switch in the top right corner.
3. Click on "Load unpacked" and select the `PhishGuardian` directory.
## Usage
1. Click on the PhishGuardian extension icon in the Chrome toolbar.
2. Login with your email credentials. For now only credentials to wp.pl mailing service are supported (this will change in the future).
3. Use the "Check Mail" button to scan for phishing emails.
4. If a phishing email is detected, a notification will appear with options to mark the email as safe or move it to the trash.
## Code Overview
### Backend (`backend.py`)
- Uses Flask to handle HTTP requests.
- Uses IMAP to connect to the email server and fetch emails.
- Uses scikit-learn to classify emails as phishing or not based on the subject and sender.
- Provides endpoints for login, checking mail, marking emails as safe, and moving emails to trash.
### Frontend
- `popup.html`: The main interface of the extension.
- `popup.js`: Handles interactions in the popup, such as login, checking mail, and handling responses.
- `background.js`: Listens for messages from the popup and handles notifications.
- `notification.html` & `notification.js`: The interface and logic for the notification popup.
## API Endpoints
- `POST /login`: Login with email credentials.
- `GET /check_mail`: Check for new emails and classify them.
- `POST /logout`: Logout from the email account.
- `POST /mark_safe/<email_id>`: Mark an email as safe.
- `POST /move_trash/<email_id>`: Move an email to the trash.