File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,6 +68,36 @@ This firewall uses a **threshold-based detection approach**:
6868 python3 test_attacks.py 127.0.0.1
6969 ```
7070
71+ ## 🏃 Running on Windows
72+
73+ This program uses ` netsh ` to manage firewall rules, which requires administrative privileges.
74+
75+ 1 . ** Open as Administrator:** Right-click on ** Command Prompt** or ** Windows PowerShell** and select ** "Run as administrator"** .
76+
77+ 2 . ** Navigate to Folder:** Change to the project directory:
78+ ``` sh
79+ cd path\t o\s imple_firewall
80+ ```
81+
82+ 3. ** (Optional) Activate Virtual Environment:** If you use a virtual environment:
83+ ` ` ` sh
84+ .\v env\S cripts\a ctivate
85+ ` ` `
86+
87+ 4. ** Install Requirements:** Install the main requirements and the Windows-specific ones:
88+ ` ` ` sh
89+ pip install -r requirements.txt
90+ pip install -r requirements-windows.txt
91+ ` ` `
92+
93+ 5. ** Run the Program:**
94+ ` ` ` sh
95+ python main.py -i " Your Interface Name"
96+
97+ # Example:
98+ python main.py -i " Ethernet"
99+ ` ` `
100+
71101# # Usage
72102
73103# ## Basic Commands
Original file line number Diff line number Diff line change 1+ # This file lists Python packages required *only* for running
2+ # this project on Windows, which are not in the main requirements.txt.
3+
4+ # psutil (used for Windows-specific interface detection) is
5+ # already listed in the main requirements.txt as a core
6+ # dependency for all platforms.
7+
8+ # Future Windows-only dependencies can be added here.
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def _get_default_interface(self) -> str:
3434 for n in names :
3535 if 'wi' in n .lower () or 'wifi' in n .lower () or 'wi-fi' in n .lower ():
3636 return n
37- return names [0 ] if names else ''
37+ return names [0 ] if names else 'Ethernet '
3838 else :
3939 interfaces = netifaces .interfaces ()
4040
You can’t perform that action at this time.
0 commit comments