while (true) {
//eat();
//sleep();
code();
}
fakuventuri / network_blocker Goto Github PK
View Code? Open in Web Editor NEWPython CLI tool to block network access of devices in LAN
License: GNU General Public License v3.0
Python CLI tool to block network access of devices in LAN
License: GNU General Public License v3.0
while (true) {
//eat();
//sleep();
code();
}
On attempting to block a device while running on windows, the program crashes with the following error
# Welcome to Network Blocker #
Script to block a device on your network
Traceback (most recent call last):
File "C:\Users\ENVY 15\Documents\network_blocker\network_blocker.py", line 323, in main
return _orig_open_pcap(iface_network_name, *args, **kargs)
File "C:\Users\ENVY 15\AppData\Local\Programs\Python\Python310\lib\site-packages\scapy\arch\libpcap.py", line 338, in __init__
print_complete_menu(
File "C:\Users\ENVY 15\Documents\network_blocker\network_blocker.py", line 189, in print_complete_menu
raise OSError(error)
OSError: Error opening adapter: The filename, directory name, or volume label syntax is incorrect. (123)
generate_devices_table(device_list, blocked_devices_threads, gateway_ip), "\n"
File "C:\Users\ENVY 15\Documents\network_blocker\network_blocker.py", line 115, in generate_devices_table
table = [
File "C:\Users\ENVY 15\Documents\network_blocker\network_blocker.py", line 122, in <listcomp>
if any(process._args[1] == device[0] for process in blocked_devices_threads)
File "C:\Users\ENVY 15\Documents\network_blocker\network_blocker.py", line 122, in <genexpr>
if any(process._args[1] == device[0] for process in blocked_devices_threads)
AttributeError: 'Thread' object has no attribute '_args'
During handling of the above exception, another exception occurred:
File "C:\Users\ENVY 15\AppData\Local\Programs\Python\Python310\lib\site-packages\scapy\arch\windows\__init__.py", lineTraceback (most recent call last):
File "C:\Users\ENVY 15\Documents\network_blocker\network_blocker.py", line 411, in <module>
main()
File "C:\Users\ENVY 15\Documents\network_blocker\network_blocker.py", line 399, in main
print_complete_menu(
File "C:\Users\ENVY 15\Documents\network_blocker\network_blocker.py", line 189, in print_complete_menu
generate_devices_table(device_list, blocked_devices_threads, gateway_ip), "\n"
File "C:\Users\ENVY 15\Documents\network_blocker\network_blocker.py", line 115, in generate_devices_table
table = [
File "C:\Users\ENVY 15\Documents\network_blocker\network_blocker.py", line 122, in <listcomp>
if any(process._args[1] == device[0] for process in blocked_devices_threads)
File "C:\Users\ENVY 15\Documents\network_blocker\network_blocker.py", line 122, in <genexpr>
if any(process._args[1] == device[0] for process in blocked_devices_threads)
AttributeError: 'Thread' object has no attribute '_args'
It can't for some strange reason find the arguments supplied for the target function in the thread object.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.