Skip to content

Commit

Permalink
combined commits pre-publish
Browse files Browse the repository at this point in the history
blacklist blocking

finetune UI phase 1

init backend

handling rating api and rate limit api

configuration, logging

integrating with backend code

local whitelist

temporary whitelist

apply new UI phase 1

secure endpoints

finetune UI percentage phase 1

bug fixes on UI, new logo

minor fixed

correction

blocking ui

using mongodb

fix NaN bug

update final assets

use prod

strictly matching

Getting blacklist from DB instead of json file

Fixed the bypass-url

Fixed block all pages in site

Added route to get whitelist in backend, check whitelist in frontend

Updated the popup on whitelist site

Updated new logo, reload tab in the first installation

Updated red flag on blocked website

Updated api url and fixed small issues

Fixed user decided to access dangerous site

Hotfix : Check whitelist after blacklist

Fixed whitelist issue and removed unused code

Catch the regex problem

Fixed regex problem

Fixed reload issue and "open in new tab" issue

Removed unnecessary permissions from manifest.json

Update default.json

Update package.json

Format code

Added website

Update description

Use Chrome API to show notification

rebase

resolve rebase

ignore jquery.js in gulp tasks

fix issue with rating

Added some new libraries, remake the filter check (not finished)

Added filter by prefix & suffix

Finalized new safeCheck method and removed old codes

Finalized new safeCheck method and removed old codes

Added webpack

Added some new libraries, remake the filter check (not finished)

remove hot reload and unused files

pump version for release

minor fix spacing

minor change

add script to release

minor fix

initial dev branch

implement web safecheck api

add client name for google request

call third-party api for safe check

remove log file

Fixed : check url instead of domain

seperate apis

api get pornlist and api import files

add maxLength for api safecheck

initial new backend structure

Update default.json

config morgan, bodyparser

done api closeSession

update dtos

done api get ping

done api rate url

done api get typelist & config middleware

update credentials for access mongodb dev

update

restructure source code backend

basic structure

done api safecheck in db

done api safecheck thirdparty

remove unuse code

Changed mongodb from srv to local

fix bug wildcard

remove global prefix

update port

add script to build for firefix

remove deploy script

fix issues with sub frames

pump version for release

pump version - 1.0.3 for release

for rebasing

pump version to release 1.0.3

Update README.md

fix issues with firefox api

more fix

Update README.md
  • Loading branch information
dothanhlam authored and Loc Mai committed May 8, 2021
1 parent aad191a commit 172d2ea
Show file tree
Hide file tree
Showing 119 changed files with 49,988 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"indent": ["error", 2],
"arrow-parens": ["error", "always"],
"max-len": [
"warn",
{
"code": 100,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreUrls": true,
"ignoreTemplateLiterals": true
}
],
"no-var": 1,
"no-useless-concat": 1,
"no-useless-constructor": 1,
"object-curly-spacing": [1, "never"],
"prefer-const": 1,
"prefer-template": 1,
"react/display-name": 0,
"react/no-deprecated": 0,
"require-jsdoc": 0,
"semi": ["error", "always"],
"quotes": ["error", "single"],
"quote-props": ["error", "consistent"],
"template-curly-spacing": [1, "never"],
"linebreak-style": 0
}
}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build
build-firefox
node_modules
.env
*.zip
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,40 @@
# chongluadao-extension
An extension aims to detect phishing websites and warns the user

<img src="https://img.shields.io/chrome-web-store/v/mdcemplfpeifcogglenloohjghjbigni.svg?label=Version&amp;colorB=fd5d93&amp;style=for-the-badge&amp;logo=google-chrome" alt="ChongLuaDao extension"> <img src="https://img.shields.io/amo/v/{4ecf7867-1c19-4d31-9249-4bfb4d6e0729}.svg?label=Version&amp;colorB=fd5d93&amp;style=for-the-badge&amp;logo=firefox-browser" alt="ChongLuaDao extension">

An extension aims to detect phishing websites and warns the user. User can submit (report/rating) a website that to be considered as phishing site. The classification is done on the client side with one-time download of classifier model and auto updating.

Origin source code based on [Phishing Site Detector Plugin](https://github.com/picopalette/phishing-detection-plugin).

# What we are doing here
We modified the source code and implemented the additional features:

Frontend:
- Localization the UI (support Vietnamese language)
- Warning user accessing from the phishing sites
- The user is able to submit / report / rate the website
- Reputation icon for Google search page

Backend:
- Reporting API
- Enrich the dataset
- Traning / classifier model
- Admin dashboard for reviewing / approving the user reports


... and much more

# Testing
You can use the developer version with Chrome (or Chromium browser family), as just following this installation guide:
- Enter the URL: chrome://extensions/
- On the top right conner, turning on Developer mode
- Click Load unpacked and browser to the folder 'frontend'
- You might need to pin the plugin as well
- Ignore all the error, it' just a developement version
- Enjoy the protection

# Setup for local dev:
Run `npm i` to install dependecies
If not yet have `build` and or `build-firefox` directory, create them with `mkdir build` and or `mkdir build-firefox`
- To build for chrome, run `npm run build`
- To build for firefox, run `npm run build-firefox`. Then go into `build-firefox` directory and remove `incognito` rule from the `manifest.json`
37 changes: 37 additions & 0 deletions backend/config/default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"app": {
"port": "6969",
"domain": "localhost",
"version": "v1",
"storage": "../data/rating.csv",
"static":"public/"
},
"auth": {
"accessTokenSecret": "somerandomaccesstoken",
"refreshTokenSecret":"somerandomstringforrefreshtoken",
"expiration": "20m",
"clients": [
{
"app": "chrome-extension",
"secret": "chongluadaowithloveforcommunity",
"role": "client"
}, {
"app": "firefox-plguin",
"secret": "chongluadaowithloveforcommunity",
"role": "client"
}
]
},
"db": {
"url": "localhost",
"port": "27017",
"username": "admin",
"password": "admin123",
"name": "admin"
},
"gcloud": {
"safecheckUrl": "https://safebrowsing.googleapis.com/v4/threatMatches:find",
"key": "AIzaSyDAR0q2v-fbXAV337qrH05byIHCl8bxMfA"
},
"maxLengthUrl": 1000
}
60 changes: 60 additions & 0 deletions backend/config/energizedData.txt

Large diffs are not rendered by default.

Loading

0 comments on commit 172d2ea

Please sign in to comment.