Coder Social home page Coder Social logo

p-yukusai / pywall Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 1.0 991 KB

A small app to make it easy to administrate simple firewall configurations.

License: GNU General Public License v3.0

Python 96.33% Inno Setup 3.67%
context-menu firewall pyqt5 python security security-tools

pywall's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @p_yukusai, you can call me Yuku, I somewhat draw and code!
  • ๐Ÿ‘€ I usually do GUI's and other small programs.
  • ๐Ÿ‘ฉโ€๐Ÿ’ผ I'm currently learning Rust and further developing AnimeEffects.
  • ๐Ÿ“ซ You can always PM me or support me in this Github or through Instagram, Twitter, Ko-fi or PayPal.

pywall's People

Contributors

dependabot[bot] avatar p-yukusai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pywall's Issues

Nonalphanumeric characters cause crashes

Good work on the last issue! I found another bug!

Describe the bug
I noticed that in some instances a .exe would not be added to the firewall. It happens when a a folder has non alphanumeric characters in it. An example would be the character โ•”. Some characters like ยฉ. Not all nonalphanumeric characters seem to cause a problem though.

To Reproduce

  1. Have a folder with a special character in it like: โ•”
  2. Allow/Deny access via context menu on that specific folder

Expected behavior
No error or maybe a notification.

Error Log
Here are some error logs:

root - ERROR - Runtime error is "'charmap' codec can't encode characters in position 59-60: 
    character maps to <undefined>", 
see full traceback bellow: 
 
Traceback (most recent call last):
  File "src\cmdWorker.py", line 86, in access_handler
    print(Path(y))
  File "encodings\cp1252.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode characters in position 59-60: character maps to <undefined>
Traceback (most recent call last):
  File "main.py", line 63, in <module>
  File "src\logger.py", line 7, in actionLogger
    print(actionLogged)
  File "encodings\cp1252.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode character '\u253c' in position 64: character maps to <undefined>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 86, in <module>
  File "src\logger.py", line 27, in logException
    actionLogger(f'Exception logged, runtime error is "{Critical}"')
  File "src\logger.py", line 7, in actionLogger
    print(actionLogged)
  File "encodings\cp1252.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode character '\u253c' in position 138: character maps to <undefined>

Desktop (please complete the following information):

  • OS: Microsoft Windows 11 Education
  • Version 10.0.22000 Build 22000

Additional context
Now I had a look at the source code at line:

                    if z in Path(y).suffix and Path(y).stem not in ignoredFiles:
                        print(Path(y))
                        allFiles.append(Path(y))

The error seems to be at the print() statement from what I can tell. This might be an error in the library you are using (from pathlib import Path), when the Path(y) is converted to a string.
Some libraries allow to set the encoding like, io:

import io
with io.open(filename,'r',encoding='utf8') as f:
    text = f.read()

But I did not look into the pathlib library further. It could also be that the error logs are inconclusive and the error happens somewhere further up the chain, you could debug it and see what happens.

A few options could be:

  1. Find out if you can set encoding for the library
  2. Try catch exception and skip folder if it happens (so at least other folders are added)
    • Maybe a message would be good
  3. Use another library that handles characters correctly

Have fun!

Flashing cmd consoles that could cause a seizure

First of all, great work, I quite like this app! It helps me a out a lot!

Describe the bug
If multiple .exe files are located in a folder and each one is deactivated/activated, a console for each .exe is started. If there are a ton of .exe files this produces quite a lot of consoles. Luckily I'm not epileptic otherwise this would have caused a seizure for sure. Granted my use case is a bit extreme as I have 30+ .exe files in the folder I want to block but nevertheless, this could pose a significant problem. Also from a technical standpoint, it's better to only issue one console if possible.

To Reproduce
Steps to reproduce the behavior:

  1. Have a ton of .exe files in a folder
  2. Disable internet access for folder

Expected behavior
The ideal case would be that every command is run in just one console.

Desktop (please complete the following information):

  • OS: Microsoft Windows 11 Education
  • Version 10.0.22000 Build 22000

Additional context
There are multiple ways to do it, a python module called subprocess or os (Example Blog Post) could be used, or simply the && operator, or maybe you could even create an executeable file and paste every command in there and start it like that. The choice is yours! If you have any further questions, please reach out!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.