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
/****************************************************** | |
* 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 |
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
def initialize(): | |
# Create initialization data and take a lot of time | |
data = ... | |
return data | |
def method_to_test( data ): | |
# Code to test | |
... |
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
import sys | |
import traceback | |
import mainprogram | |
if __name__=='__main__': | |
cache = None | |
is_first_iteration = True |