Permalink
Cannot retrieve contributors at this time
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?
harbourmaster/src/harbourmaster.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
16 lines (12 sloc)
534 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!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" |