-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
digehode
committed
Jul 29, 2020
1 parent
01d8ded
commit be83c75
Showing
6 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*~ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
INVENV = $(shell pip3 -V | grep 'venv') | ||
current_dir = $(shell pwd) | ||
|
||
prereqs: venvcheck FORCE | ||
pip install -r requirements.txt | ||
|
||
venv: FORCE | ||
python3 -m venv venv | ||
|
||
docs: | ||
pdoc --html ./src/harbourmaster.py --force | ||
|
||
venvcheck: | ||
ifeq ($(INVENV),) | ||
$(error You should only run this from within the venv. Use '. ./venv/bin/activate') | ||
else | ||
@echo "venv check passed\n" | ||
endif | ||
|
||
|
||
test: FORCE venvcheck | ||
py.test -v tests/ | ||
|
||
|
||
FORCE: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,32 @@ | ||
# harbourmaster | ||
--- | ||
title: Harbourmaster | ||
author: James Shuttleworth and YOUR NAME HERE | ||
--- | ||
|
||
# HarbourMaster | ||
|
||
Harbourmaster is a simple port-scanning tool | ||
|
||
# Introduction | ||
|
||
This is a very simple tool, but it does (or will do) a few useful things. | ||
|
||
In cybersecurity, we often have to work with data in different | ||
representations. For example, when creating payloads for exploits, we | ||
might have to switch between bytes represented as their ASCII values | ||
and their binary, decimal or hexadecimal (hex) representation. For | ||
example, the capital letter A has the ASCII code 65. 65 in hex | ||
is 41. In octal it is 101, and in binary it is 01000001. | ||
|
||
|
||
# Completing Transcoder | ||
|
||
TODO: | ||
|
||
|
||
# TODO - things left to do before students get access | ||
|
||
- Clear up TODO items | ||
- Put proper pydoc generation in and fill in all docstrings | ||
- Write bit about cloning repo | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
wheel | ||
colored | ||
pytest | ||
pdoc3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!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" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import pytest | ||
import sys | ||
sys.path.append("./src/") | ||
import harbourmaster | ||
|
||
#TODO: write tests |