Skip to content
Permalink
be83c75234
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
16 lines (12 sloc) 534 Bytes
#!python
"""Simple program for scanning ports on a given host and acting on results"""
import colored
def testPort(host:str,portnum:int):
"""Given a host (IP or name) and a port number, connect if possible and return any data transmitted.
Args:
host (string): the host to scan. Can be an IP address or hostname
portnum (int): the port number, between 0 and 65535
Returns:
string or None: the data returned by the connection, or None if the connection failed.
"""
return "Not implemented"