On Windows though, I got no clue. If you just search "how to make a firewall on Windows using Python
On Windows though, I got no clue. If you just search "how to make a firewall on Windows using Python" you should find something
13 Replies
Even then it's still up for definition what we consider a firewall, is it just the software solution on an endpoint? Is it actual hardware like the stuff by Cisco? Good answer tho
As he mentions creating it with Python I assume he means a piece of software that monitors incoming and outgoing network traffic. At the very core all a firewall is:
A firewall is a network security device that monitors incoming and outgoing network traffic and decides whether to allow or block specific traffic based on a defined set of security rules.From what is a firewall? - Cisco
Cisco
What Is a Firewall?
A firewall is a network security device that monitors traffic to or from your network. It allows or blocks traffic based on a defined set of security rules.
Regardless of where it's implemented this is still a baseline that needs to be implemented. Well regardless @Adam if you want some more help it would be nice if you could elaborate a bit!
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
Very nice'
Here is a subjectively better way to write you code
Setting
sys.stdout
like that is considered hackish. So instead I opt to use the proper function for writing text to a file.
I also changed up your isEven
function to is_even
. As the Python style guide states that functions should be snake_case. I also changed the function to just return the result of (number % 2) == 0
instead of using an if statment
I remove your usage of the variable test
as in Python an object is still able to reference it's old value before it gets changed. Which is why I'm able to do things like collatz = int(collatz / 2)
I also removed your if statment checking if collatz == 1
, as we know it equals one. We know this because our while loop ensures this.Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
No problem just figured I'd rewrite it to give you an idea of other ways of writing Python
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
👋
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
In the terminal?
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View