From a459be1a5f31be89331d1b81c6e280356551ede7 Mon Sep 17 00:00:00 2001 From: JGill Date: Sat, 25 Jan 2020 11:25:46 +1030 Subject: [PATCH 1/3] Don't error if logins.json is missing --- privacyfighter/pf.py | 67 +++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/privacyfighter/pf.py b/privacyfighter/pf.py index bb380fb..847172b 100755 --- a/privacyfighter/pf.py +++ b/privacyfighter/pf.py @@ -14,13 +14,12 @@ import psutil import requests - # GUI-SETUP, is a tag used to find lines to change, to produce the gui-version -# from gooey import Gooey # GUI-SETUP, comment out when producing cli version +from gooey import Gooey # GUI-SETUP, comment out when producing cli version -gui_mode = False # GUI-SETUP, change to 'True' in gui-version +gui_mode = True # GUI-SETUP, change to 'True' in gui-version -__version__ = "2.0.0" +__version__ = "2.0.1" __basefilepath__ = os.path.dirname(os.path.abspath(__file__)) repo_location = "https://raw.githubusercontent.com/jotyGill/privacy-fighter/master/privacyfighter" @@ -37,33 +36,33 @@ # GUI-SETUP, comment out the decorator @Gooey when in cli-mode -# @Gooey( -# progress_regex=r"^progress: (?P\d+)/(?P\d+)$", -# progress_expr="current / total * 100", -# hide_progress_msg=True, -# program_name="Privacy Fighter", -# requires_shell=False, -# tabbed_groups=True, -# default_size=(900, 530), -# menu=[ -# { -# "name": "About", -# "items": [ -# { -# "type": "AboutDialog", -# "menuTitle": "About", -# "name": "Privacy Fighter", -# "description": "A Browser Setup To Protect Your Privacy", -# "version": __version__, -# "website": "https://github.com/jotyGill/privacy-fighter", -# "developer": "https://github.com/jotyGill", -# "license": "GNU General Public License v3 or later (GPLv3+)", -# }, -# {"type": "Link", "menuTitle": "Project Link", "url": "https://github.com/jotyGill/privacy-fighter"}, -# ], -# } -# ], -# ) +@Gooey( + progress_regex=r"^progress: (?P\d+)/(?P\d+)$", + progress_expr="current / total * 100", + hide_progress_msg=True, + program_name="Privacy Fighter", + requires_shell=False, + tabbed_groups=True, + default_size=(900, 530), + menu=[ + { + "name": "About", + "items": [ + { + "type": "AboutDialog", + "menuTitle": "About", + "name": "Privacy Fighter", + "description": "A Browser Setup To Protect Your Privacy", + "version": __version__, + "website": "https://github.com/jotyGill/privacy-fighter", + "developer": "https://github.com/jotyGill", + "license": "GNU General Public License v3 or later (GPLv3+)", + }, + {"type": "Link", "menuTitle": "Project Link", "url": "https://github.com/jotyGill/privacy-fighter"}, + ], + } + ], +) def main(): parser = argparse.ArgumentParser(description="Privacy-Fighter: A Browser Setup To Protect Your Privacy") if not gui_mode: @@ -327,7 +326,11 @@ def import_profile_data(import_profile, profile_name, firefox_path, firefox_ini_ pass for file in data_files: - shutil.copy2(os.path.join(import_profile_path, file), os.path.join(firefox_path, profile_name)) + try: + shutil.copy2(os.path.join(import_profile_path, file), os.path.join(firefox_path, profile_name)) + except FileNotFoundError: + # logins.json is missing, user never saved any password in FF + pass def resource_path(relative_path): From 75e36a229c285e584779d8bf51937e6ace771dcc Mon Sep 17 00:00:00 2001 From: JGill Date: Sat, 25 Jan 2020 11:29:17 +1030 Subject: [PATCH 2/3] Version 2.0.1 --- docs/README.md | 6 +++--- privacyfighter/version.txt | 2 +- setup.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/README.md b/docs/README.md index afff862..cd566f5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -56,7 +56,7 @@ This script installs and configures the following tools. A huge thanks to all th 2. [uBlock Origin](https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/): An efficient "wide-spectrum blocker", it blocks, ads, trackers and malware sites. [https://github.com/gorhill/uBlock] -3. [Temporary containers](https://addons.mozilla.org/en-US/firefox/addon/temporary-containers/): Temporary Containers takes "Firefox Containers" to whole new level by making every new tab a different container. you may have heard of the advise to use multiple browsers. This pretty much makes every new tab a different, isolated (cookies, localstorage) browser, which gets deleted after it is closed. Eliminates long term tracking done using, cookies, storage caches, Etags.[https://github.com/stoically/temporary-containers] +3. [Temporary Containers](https://addons.mozilla.org/en-US/firefox/addon/temporary-containers/): Temporary Containers takes "Firefox Containers" to whole new level by making every new tab a different container. you may have heard of the advise to use multiple browsers. This pretty much makes every new tab a different, isolated (cookies, localstorage) browser, which gets deleted after it is closed. Eliminates long term tracking done using, cookies, storage caches, Etags.[https://github.com/stoically/temporary-containers] Configuration: Automatic mode enabled (every new tab opens in a new isolated container). Containers colour is set to random. @@ -68,9 +68,9 @@ HTTPS Everywhere is a Firefox extension by [EFF](https://www.eff.org/) to protec 5. [Canvas Blocker](https://addons.mozilla.org/en-US/firefox/addon/canvasblocker/): Aims to prevent websites from using the some Javascript APIs to fingerprint users. resistFingerprinting takes preference to this, CanvasBlocker works as fallback for canvas fingerprinting. It also protects form fingerprinting the following APIs (by faking the values): canvas 2d, webGL, audio, history, DOMRect [https://github.com/kkapsner/CanvasBlocker] -6. [decentraleyes](https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/): Protects you against tracking through "free", centralized, Content Delivery Networks, by locally storing libraries instead of fetching them from the tracking CDNs. +6. [Decentraleyes](https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/): Protects you against tracking through "free", centralized, Content Delivery Networks, by locally storing libraries instead of fetching them from the tracking CDNs. -7. [clear_urls](https://gitlab.com/KevinRoebert/ClearUrls/): Protects your privacy by removing the tracking fields in URLs.[https://gitlab.com/KevinRoebert/ClearUrls/] +7. [ClearURLs](https://addons.mozilla.org/en-US/firefox/addon/clearurls/): Protects your privacy by removing the tracking fields in URLs.[https://gitlab.com/KevinRoebert/ClearUrls/] 8. [Terms of Service; Didn't Read](https://addons.mozilla.org/en-US/firefox/addon/terms-of-service-didnt-read/): Provides rating and extracts key points of the lengthy Terms and Conditions no one reads.[https://tosdr.org/] diff --git a/privacyfighter/version.txt b/privacyfighter/version.txt index 227cea2..38f77a6 100644 --- a/privacyfighter/version.txt +++ b/privacyfighter/version.txt @@ -1 +1 @@ -2.0.0 +2.0.1 diff --git a/setup.py b/setup.py index 9dfac2d..d7e15f3 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ # pf_location = os.path.join(os.path.abspath(os.path.dirname(__file__)), "privacyfighter") # exec(open(os.path.join(pf_location, "version.py")).read()) -__version__ = "2.0.0" +__version__ = "2.0.1" if sys.version_info < (3, 5): sys.stderr.write("ERROR: requires Python 3.5 or above." + "Install using 'pip3' instead of just 'pip' \n") From 8ceb7635427dec4f2fadf064fc91c14cf74a6dda Mon Sep 17 00:00:00 2001 From: JGill Date: Sat, 25 Jan 2020 14:09:15 +1030 Subject: [PATCH 3/3] cli mode --- privacyfighter/pf.py | 58 ++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/privacyfighter/pf.py b/privacyfighter/pf.py index 847172b..345aedc 100755 --- a/privacyfighter/pf.py +++ b/privacyfighter/pf.py @@ -15,9 +15,9 @@ import psutil import requests # GUI-SETUP, is a tag used to find lines to change, to produce the gui-version -from gooey import Gooey # GUI-SETUP, comment out when producing cli version +# from gooey import Gooey # GUI-SETUP, comment out when producing cli version -gui_mode = True # GUI-SETUP, change to 'True' in gui-version +gui_mode = False # GUI-SETUP, change to 'True' in gui-version __version__ = "2.0.1" __basefilepath__ = os.path.dirname(os.path.abspath(__file__)) @@ -36,33 +36,33 @@ # GUI-SETUP, comment out the decorator @Gooey when in cli-mode -@Gooey( - progress_regex=r"^progress: (?P\d+)/(?P\d+)$", - progress_expr="current / total * 100", - hide_progress_msg=True, - program_name="Privacy Fighter", - requires_shell=False, - tabbed_groups=True, - default_size=(900, 530), - menu=[ - { - "name": "About", - "items": [ - { - "type": "AboutDialog", - "menuTitle": "About", - "name": "Privacy Fighter", - "description": "A Browser Setup To Protect Your Privacy", - "version": __version__, - "website": "https://github.com/jotyGill/privacy-fighter", - "developer": "https://github.com/jotyGill", - "license": "GNU General Public License v3 or later (GPLv3+)", - }, - {"type": "Link", "menuTitle": "Project Link", "url": "https://github.com/jotyGill/privacy-fighter"}, - ], - } - ], -) +# @Gooey( +# progress_regex=r"^progress: (?P\d+)/(?P\d+)$", +# progress_expr="current / total * 100", +# hide_progress_msg=True, +# program_name="Privacy Fighter", +# requires_shell=False, +# tabbed_groups=True, +# default_size=(900, 530), +# menu=[ +# { +# "name": "About", +# "items": [ +# { +# "type": "AboutDialog", +# "menuTitle": "About", +# "name": "Privacy Fighter", +# "description": "A Browser Setup To Protect Your Privacy", +# "version": __version__, +# "website": "https://github.com/jotyGill/privacy-fighter", +# "developer": "https://github.com/jotyGill", +# "license": "GNU General Public License v3 or later (GPLv3+)", +# }, +# {"type": "Link", "menuTitle": "Project Link", "url": "https://github.com/jotyGill/privacy-fighter"}, +# ], +# } +# ], +# ) def main(): parser = argparse.ArgumentParser(description="Privacy-Fighter: A Browser Setup To Protect Your Privacy") if not gui_mode: