Currently, the code is hard coded to work with specific users. Future work will be towards making the project available to anyone.
Browswer extension to help detect phishing emails. could also be a plug-in to outlook. The goal of the code is to have a back-end that handles requests from any front-end and determine if email is phishing or not.
- Interaction with Gmail API
- Interaction with ChatGPT API
- Google Chrome Extension
// TODO: Outline how to run extension and backend.
The instructions below assume that python3 and pip3 refer to Python 3.x and Pip 3.x.
- Create a virtual environment:
python -m venv phishenv
- Activate virtual environment:
- Mac or Linux:
source phishenv/bin/activate
- Windows:
cd .\phishenv\Scripts
then.\Activate.ps1
- Mac or Linux:
- Install dependencies:
pip3 install -r requirements.txt
-
Activate virtual environment with the following commands:
- Mac or Linux:
source phishenv/bin/activate
- Windows:
cd .\phishenv\Scripts
then.\Activate.ps1
- Mac or Linux:
-
Run the Flask server
- Python path:
- Mac or Linux: export python path with
export PYTHONPATH=$(pwd)
- Windows: Add python to your Environment Variables
- Mac or Linux: export python path with
- then enter
python3 app.py
- Python path:
The terminal will give this response if everything is ran correctly
Serving Flask app 'flask_main'
Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
Running on http://127.0.0.1:5000
Press CTRL+C to quit
- Go to the Extensions page by entering chrome://extensions in a new tab. (By design chrome:// URLs are not linkable.)
- Alternatively, click on the Extensions menu puzzle button and select Manage Extensions at the bottom of the menu.
- Or, click the Chrome menu, hover over More Tools, then select Extensions.
-
Enable Developer Mode by clicking the toggle switch next to Developer mode.
-
Click the Load unpacked button and select the extension directory.
-
The extension should now appear with the other active Chrome Extensions in the Chrome Browser.
- Install and setup Google Cloud CLI
- Create a Google Cloud project
- Build and push a Docker image
- Upon completion, there should be two new files unique to your project, Dockerfile and cloudbuild.yaml.
- Deploying image
- In your Google Cloud project, go to Cloud Run.
- Click the "Create Service" button and use the image you pushed to the Artifact Registry.
- Once the service has been created, go into the services page and make note of the url next to the service name.
-
Submit the build
- Open the Google Cloud SDK Shell in the same directoy as the project
- Run
gcloud builds submit --region=
[your region]--config cloudbuild.yaml
- This sends the build to the Artifact Registry
-
Deploy the revision
- Go to the Cloud Run into the service running your application
- Click "Edit & Deploy New Revision"
- Click "Deploy"
- Verify Deployment
- Look at the revisions page of your service and see your revision and the time you deployed it.
- emails too long will not work.
- If the email messages are in a weird format, it wont work.