From 1134b01810135203b7fd797f5cad71af3286e113 Mon Sep 17 00:00:00 2001 From: "Daniel \"Speyedr\" Summer" <38199900+Speyedr@users.noreply.github.com> Date: Mon, 7 Mar 2022 21:23:12 +1100 Subject: [PATCH 1/7] Oops. Left some print statements in that shouldn't have been. As a result, some messages are being printed to the console that shouldn't be and will eventually flood the window (and you can no longer see the menu as a result). Although you can still use the menu, these statements should be kept out of the production version anyways. The only reason they existed in the first place is because I wrote the Logger class later in the project, and was initially just printing to help debug the filters. I removed most statements but clearly missed a few. --- filter.py | 2 +- logger.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/filter.py b/filter.py index 02c0514..31471f3 100755 --- a/filter.py +++ b/filter.py @@ -105,7 +105,7 @@ def should_allow(self, packet): if (self.flags & FilterFlags.DROP_LENGTH) and packet.is_inbound \ and packet.tcp is not None and packet.src_addr == FilterSettings.SERVER_IP: content_length = search(FilterSettings.GET_RESPONSE_LENGTH, packet.payload) - print(content_length) + #print(content_length) if content_length and self.drop_lengths.bounds(int(content_length.group())): if self.logger is not None: self.logger.put((encodebytes(packet.raw), packet.interface, packet.direction, diff --git a/logger.py b/logger.py index 019b9fd..d145cbc 100755 --- a/logger.py +++ b/logger.py @@ -68,7 +68,7 @@ def construct_packet_debug_info(packet, allowed, reason): length = str(len(packet.payload)) source = packet.src_addr + ":" + str(packet.src_port) destination = packet.dst_addr + ":" + str(packet.dst_port) - print("Parts:", protocol, destination, rule, length, source, destination) + #print("Parts:", protocol, destination, rule, length, source, destination) message = protocol+" PACKET "+decision+" FROM "+str_pad_right(source)+" -> "+\ str_pad_right(destination)+" Len:"+str_pad_right(length, 8)+" Reason:"+rule return message From 9b2b2a4e254f1293f339066acd10ba251be5822c Mon Sep 17 00:00:00 2001 From: "Daniel \"Speyedr\" Summer" <38199900+Speyedr@users.noreply.github.com> Date: Mon, 7 Mar 2022 22:50:33 +1100 Subject: [PATCH 2/7] Renamed SCBlocker.ico because some users inexperienced with Git / GitHub have been cloning the source on accident instead of downloading the compiled release and are getting confused by the name of the icon file. --- SCBlocker.ico => icon.ico | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename SCBlocker.ico => icon.ico (100%) diff --git a/SCBlocker.ico b/icon.ico similarity index 100% rename from SCBlocker.ico rename to icon.ico From c796bf6e476ccaa65121a25e5430f61ce9c0ce3b Mon Sep 17 00:00:00 2001 From: "Daniel \"Speyedr\" Summer" <38199900+Speyedr@users.noreply.github.com> Date: Mon, 7 Mar 2022 22:52:18 +1100 Subject: [PATCH 3/7] Updated version info and updated build settings to agree with the renamed icon file. --- main.py | 2 +- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index d02c427..fb322e3 100755 --- a/main.py +++ b/main.py @@ -28,7 +28,7 @@ DONATE = "https://ko-fi.com/speyedr" -VERSION = "0.1" +VERSION = "0.1.1" WINDOW_NAME = "Speyedr's SocialClub Notification Blocker v" + VERSION UI_WAIT_TIME = 0.01 UI_TOP_MARGIN = 1 diff --git a/setup.py b/setup.py index b68db4e..6693c13 100755 --- a/setup.py +++ b/setup.py @@ -15,11 +15,11 @@ replace_paths=[("*", "")], optimize=2, zip_include_packages="*", zip_exclude_packages=zip_exclude_packages, silent=True) executables = [ - Executable('main.py', targetName="SCBlocker.exe", icon="SCBlocker.ico", + Executable('main.py', targetName="SCBlocker.exe", icon="icon.ico", copyright='Copyright (C) 2022 Daniel Summer') ] -version = "0.1.0" +version = "0.1.1" build_path = 'build/exe.win-amd64-{}.{}'.format(sys.version_info.major, sys.version_info.minor) From 08feccb99754fa490e44cfa1bf68c8cade3036ef Mon Sep 17 00:00:00 2001 From: "Daniel \"Speyedr\" Summer" <38199900+Speyedr@users.noreply.github.com> Date: Mon, 7 Mar 2022 22:55:54 +1100 Subject: [PATCH 4/7] Updated README.md Made front-page download link bigger, updated version info w/ predicted link for v0.1.1 release. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aef8102..7a44e18 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # SocialClub Notification Blocker -### [Download v0.1.0](https://github.com/Speyedr/socialclub-notification-blocker/releases/download/v0.1.0/SocialClubBlocker-0.1.0.zip) +# [Download v0.1.1](https://github.com/Speyedr/socialclub-notification-blocker/releases/download/v0.1.1/SocialClubBlocker-0.1.1.zip) Main Menu ## Usage -1. Download and extract (or build yourself). +1. Download and extract (or build yourself). The direct download link to the latest compiled release is above this message. 2. Run `SCBlocker.exe` as Administrator. - Alternatively, if you have Python, you can run directly from the interpreter by executing `python main.py` in an elevated command prompt while at the repo directory. From 79b80837fc36aaacc572096928686b26a5f5ca9d Mon Sep 17 00:00:00 2001 From: "Daniel \"Speyedr\" Summer" <38199900+Speyedr@users.noreply.github.com> Date: Mon, 7 Mar 2022 23:11:54 +1100 Subject: [PATCH 5/7] Fixed typo in requirements file. Build dependency cx-Freeze used '=' operator which is not valid. Fixed to '=='. --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 957d2ed..f7b3bd4 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ pydivert~=2.1.0 colorama~=0.4.1 -cx-Freeze=6.8.3 \ No newline at end of file +cx-Freeze==6.8.3 \ No newline at end of file From e0371859f13dd16af701770e2f1a8f9374db29d6 Mon Sep 17 00:00:00 2001 From: "Daniel \"Speyedr\" Summer" <38199900+Speyedr@users.noreply.github.com> Date: Mon, 7 Mar 2022 23:16:54 +1100 Subject: [PATCH 6/7] Adjusted zipped folder name. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6693c13..fc699e3 100755 --- a/setup.py +++ b/setup.py @@ -74,4 +74,4 @@ def zip_folder(folder_path, output_path): except: pass -zip_folder(build_path, 'build\exe\SCBlocker-{}.zip'.format(version)) \ No newline at end of file +zip_folder(build_path, 'build\exe\SocialClubBlocker-{}.zip'.format(version)) \ No newline at end of file From 8533b305254b0cab30d784191cd9f79a50192e02 Mon Sep 17 00:00:00 2001 From: "Daniel \"Speyedr\" Summer" <38199900+Speyedr@users.noreply.github.com> Date: Mon, 7 Mar 2022 23:22:49 +1100 Subject: [PATCH 7/7] Fixed command in build tutorial. Added note that building is not necessary, hopefully to prevent confusion. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7a44e18..aff3b40 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ - If you encounter a crash or otherwise application-breaking bug, please follow the instructions and [submit an issue here](https://github.com/Speyedr/socialclub-notification-blocker/issues/new/choose). ## Build Instructions +**NOTE:** If you are just looking for the download without building yourself, you need to go to [Releases](https://github.com/Speyedr/socialclub-notification-blocker/releases) instead. Or just click the "Download" link near the top of this page. #### Windows 1) Install Python 3 (3.8+ recommended) @@ -42,10 +43,10 @@ 2) Run the following commands in a command prompt: ``` :: Make sure to open the command prompt in / navigate to your local repo directory before running these commands. -C:\Users\Speyedr\socialclub-notification-blocker> pip install requirements.txt +C:\Users\Speyedr\socialclub-notification-blocker> pip install -r requirements.txt :: If 'pip' is not recognised (i.e. it wasn't added to PATH) then you will need to provide the absolute path to pip.exe, e.g. :: Make sure to check your exact install directory (your version number or bundle may be different) -:: C:\Users\Speyedr\socialclub-notification-blocker> "C:\Program Files\Python 3.8\Scripts\pip.exe" install requirements.txt +:: C:\Users\Speyedr\socialclub-notification-blocker> "C:\Program Files\Python 3.8\Scripts\pip.exe" install -r requirements.txt C:\Users\Speyedr\socialclub-notification-blocker> python setup.py build :: Again, if python is not recognised then you will need to use the absolute path instead: :: C:\Users\Speyedr\socialclub-notification-blocker> "C:\Program Files\Python 3.8\python.exe" setup.py build