Exemplo n.º 1
0
def run():
    """
    The main run call.
    Runs the entire client core.
    """
    ci_token = os.getenv('CI')
    if not ci_token:
        try:
            # if `install_requirements` was run, reimport the framework.
            if requirements_reinstalled:
                sigma = import_framework()
            else:
                sigma = ApexSigma()
            sigma.run()
        except (ImportError, ModuleNotFoundError, NameError):
            install_requirements()
            run()
        except KeyboardInterrupt:
            pass
    else:
        exit(0)
Exemplo n.º 2
0
#!/usr/bin/env python3.6
import errno
import os
import sys

from sigma.core.sigma import ApexSigma

try:
    assert sys.version_info >= (3, 6)
except AssertionError:
    print('Fatal Error: Wrong Python Version! Sigma supports Python 3.6+!')
    exit(errno.EINVAL)

if __name__ == '__main__':
    ci_token = os.getenv('CI')
    if not ci_token:
        sigma = ApexSigma()
        sigma.run()
    else:
        exit(0)