Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

portscan with python

import socket
host = "localhost"
ports = [21,22,23,24,25,110,80,443] # Add Port
for port in ports:
  s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
  p = s.connect_ex((host,port))
  if p == 0:
    print(f"Port: {port} Open!")
  else:
    print(f"Port: {port} Filter!")
Comment

PREVIOUS NEXT
Code Example
Python :: ignore warning sklearn 
Python :: pen down python turtle 
Python :: virtual environment mac 
Python :: urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123) 
Python :: python key down 
Python :: python loop through directory 
Python :: cos in python in degrees 
Python :: pygame quit 
Python :: ggplot2 histogram 
Python :: python sendmessage whatsapp 
Python :: save image requests python 
Python :: yield godot 
Python :: python find files recursive 
Python :: how to locate image using pyautogui 
Python :: pandas dataframe from dict 
Python :: pandas group by concat 
Python :: discord.py dm specific user 
Python :: python check if port in use 
Python :: python print in color 
Python :: list of prime numbers in python 
Python :: cors error in flask 
Python :: how to remove coma in python 
Python :: debugging pytest in vscode 
Python :: python system arguments 
Python :: django runserver 
Python :: Change the user agent selenium 
Python :: python get index of item in 2d list 
Python :: pytesseract pdf to text 
Python :: upgrade package python 
Python :: install python 3.6 mac brew 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =