Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianZimmeck committed Aug 22, 2024
2 parents 15d1161 + e72d192 commit be1c7f7
Show file tree
Hide file tree
Showing 8 changed files with 1,187 additions and 1,392 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ Here is how you install Privacy Pioneer for development purposes:
xcode-select --install
```
After you build the Privacy Pioneer App using the `npm install -production=false` or `xcode-select --install`, you might find that your package-lock.json file has been updated with dependencies that are different from the ones in the repository. This is because the package-lock.json file is generated based on the versions of the dependencies that are newer available at the time of installation. If you could successfully build the Privacy Pioneer App and run this extension in the brower, you can ignore this issue.
For any issues with incorrect dependency versions, copy the package-lock.json file from the repository into your local directory and run:
```bash
Expand Down
2,547 changes: 1,167 additions & 1,380 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"ansi-html": "^0.0.9",
"ansi-regex": "^6.0.1",
"async": "^3.2.4",
"axios": "^1.6.0",
"axios": "^1.7.4",
"bootstrap": "^5.0.0",
"framer-motion": "^4.0.3",
"glob-parent": "^6.0.2",
Expand Down Expand Up @@ -84,11 +84,14 @@
"style-loader": "^2.0.0",
"terser-webpack-plugin": "^5.1.1",
"wait-on": "^7.2.0",
"web-ext": "^7.10.0",
"web-ext": "^8.2.0",
"webpack": "^5.76.0",
"webpack-cli": "^4.5.0",
"webpack-dev-server": "^4.11.1"
},
"resolutions": {
"ws": "^8.17.1"
},
"babel": {
"presets": [
"@babel/preset-react",
Expand Down
1 change: 1 addition & 0 deletions src/background/analysis/classModels.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const resourceTypeEnum = Object.freeze({
subFrame: "sub_frame",
WebSocket: "websocket",
mainFrame: "main_frame",
beacon: "beacon",
});

/**
Expand Down
4 changes: 1 addition & 3 deletions src/background/analysis/interactDB/addEvidence.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export async function addToEvidenceStore(
evidenceToAdd,
parent,
rootU,
requestU,
requestU
) {
/**
* This is a known bug where certain websites intiate requests where the rootURL
Expand Down Expand Up @@ -235,7 +235,6 @@ export async function addToEvidenceStore(
return replaceCoors(str, loc, userData);
}


/**
* @param {string} str str we're operating on
* @param {string} latLng either "lat" or "lng"
Expand Down Expand Up @@ -287,7 +286,6 @@ export async function addToEvidenceStore(
return "";
}


/**
* @param {string} strReq
* @param {number} stIdx
Expand Down
12 changes: 8 additions & 4 deletions src/background/analysis/requestAnalysis/scanHTTP.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,21 @@ import {
encodedEmailSearch,
dynamicPixelSearch,
} from "./searchFunctions.js";
import { permissionEnum, typeEnum, resourceTypeEnum, Evidence } from "../classModels.js";
import {
permissionEnum,
typeEnum,
resourceTypeEnum,
Evidence,
} from "../classModels.js";
import { lengthHeuristic } from "../requestAnalysis/earlyTermination/heuristics.js";

/**
* This function runs all of the apporpriate analysis functions for an HTTP request.
* It returns an empty array if no evidence is found. Else an array of arrays containing the
* information to be added.
*
*
* Defined in scanHTTP.js
*
*
* Used in analyze.js
* @param {{ rootUrl: any; reqUrl: any; urlClassification: any; type: string; }} request An HTTP request to be analyzed
* @param {any[]} userData
Expand Down Expand Up @@ -86,7 +91,6 @@ export function getAllEvidenceForRequest(request, userData) {
arr.push(evList); // push the evidence to the arr
}
}


executeAndPush(urlSearch(rootUrl, reqUrl, request.urlClassification));

Expand Down
4 changes: 2 additions & 2 deletions src/background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async function apiSend() {
if (!Object.keys(hostnameHold).includes(currentHostName)) {
// console.log("loaded " + currentHostName)
hostnameHold[currentHostName] = Date.now();
setTimeout(sender, 30000);
setTimeout(sender, 60000);
}
}
//@ts-ignore
Expand All @@ -95,7 +95,7 @@ if (IS_CRAWLING) {
// https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest/ResourceType
const filter = {
urls: ["<all_urls>"],
types: ["script", "xmlhttprequest", "sub_frame", "image"],
types: ["script", "xmlhttprequest", "sub_frame", "image", "beacon"],
};

// initialize the evidenceQ that will add evidence to the DB as we get it.
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "privacy-pioneer",
"version": "1.2.1",
"version": "1.2.3",
"permissions": [
"webRequest",
"<all_urls>",
Expand Down

0 comments on commit be1c7f7

Please sign in to comment.