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
#!/usr/bin/env python | |
import pdb | |
from intellect.Intellect import Intellect | |
from wobbit import ColoredWobbit | |
if __name__ == '__main__': | |
print 'Running...' | |
intel = Intellect() | |
pdb.set_trace() |
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
from intellect.Intellect import Intellect | |
if __name__ == '__main__': | |
test_intellect = Intellect() | |
# This should throw a generic exception | |
try: | |
test_intellect.learn('/path/to/bad/file.policy') | |
except Exception: |
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
@staticmethod | |
def local_file_uri(file_path): | |
''' | |
Helper/Utility method to take file system paths and return a file URI for use | |
with learn, and learn_policy methods | |
Args: | |
file_path: The file path to the policy | |
Returns: |
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
@staticmethod | |
def local_file_uri(file_path): | |
''' | |
Helper/Utility method to take file system paths and return a file URI for use | |
with learn, and learn_policy methods | |
Args: | |
file_path: The file path to the policy | |
Returns: |
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 binascii | |
# This is the original puzzle from the mail sack! | |
puzzle = """ | |
9B3E9D48B3A3C99D162D2A75E44FA14A0C3A9261C5873E6D0AB522D2A7 | |
0E4C59D0E2D0A5063CD83524C38332659A51684583522C499663CFAF26A | |
48A9222C39F366CF9D4294187524C38B067449916B45A5063C59F3A2D38 | |
33A25A8B4A7C5A7527D08B3AA488B26950A53E3D283369AE8F16745A506A | |
499D1E1CF89166499716A48934E3C59D169419932CC9A7068528B52A59A | |
F1664C5B1A7D59D122C4A106A548B4A7549F166D0993ECAE9F3AA488B1A |