View knock-knock.c
/****************************************************** | |
* knock-knock 0.1 - GPL License v3.0 | |
* Copyright (c) 2010 Emmanuel Goossaert | |
* emmanuel at goossaert dot com | |
* | |
* See also: | |
* - https://github.com/goossaert/algorithms/tree/master/port-knocking | |
* - http://codecapsule.com/2010/07/06/knock-knock-secure-your-ssh-server-using-port-knocking/ | |
* | |
* Knock-knock is a daemon that implements port knocking |
View mainprogram.py
def initialize(): | |
# Create initialization data and take a lot of time | |
data = ... | |
return data | |
def method_to_test( data ): | |
# Code to test | |
... |
View wrapper.py
import sys | |
import traceback | |
import mainprogram | |
if __name__=='__main__': | |
cache = None | |
is_first_iteration = True |