Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/python
- import socket
- import errno
- for i in range(256):
- try:
- s = socket.socket(i, 0, 0)
- except OSError as e:
- if e.errno == 97:
- continue
- elif e.errno == 1:
- print(f"socket({i:02d}): This user does not have access to this socket.")
- continue
- print(f"socket({i:02d}): This user has access to this socket.")
Advertisement
Add Comment
Please, Sign In to add comment