Skip to content

Commit

Permalink
Merge pull request #4 from Speyedr/dev
Browse files Browse the repository at this point in the history
Version 0.1.1
  • Loading branch information
Speyedr authored Mar 7, 2022
2 parents 1db39c6 + 8533b30 commit 01494b8
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

<img src="/img/SCBlockerTease1.png" alt="Main Menu" height=300 width=562>

## 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.
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pydivert~=2.1.0
colorama~=0.4.1
cx-Freeze=6.8.3
cx-Freeze==6.8.3
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -74,4 +74,4 @@ def zip_folder(folder_path, output_path):
except:
pass

zip_folder(build_path, 'build\exe\SCBlocker-{}.zip'.format(version))
zip_folder(build_path, 'build\exe\SocialClubBlocker-{}.zip'.format(version))

0 comments on commit 01494b8

Please sign in to comment.