コード例 #1
0
    def atom(self, host):
        import bsd
        import linux
        import mac
        import solaris
        import unix
        import windows
        import urllib
        from core.urli import sansor
        host = sansor().fransor(host)
        hostp = sansor().pransor(host)
        if sansor().cransor(hostp):
            header = urllib.urlopen(host).headers
            final = []
            bsd = bsd.Bsd().run(header)
            lnx = linux.Linux().run(header)
            mac = mac.Mac().run(header)
            slr = solaris.Solaris().run(header)
            unx = unix.Unix().run(header)
            win = windows.Windows().run(header)

            eve = [bsd, lnx, mac, slr, unx, win]
            for key in eve:
                if key:
                    final.append(key)
            if final == []:
                final.append('none')
            return final
        else:
            return None
コード例 #2
0
def Os(headers):
	return (
		bsd.Bsd().run(headers),
		windows.Windows().run(headers),
		linux.Linux().run(headers),
		solaris.Solaris().run(headers),
		unix.Unix().run(headers),
		mac.Mac().run(headers)
		)
コード例 #3
0
"""

# python imports
import __main__ as main
import logging
import re
import sys
import os
import time

# pip imports
import boto3

# custom imports
import linux
linux = linux.Linux()

# automatically detect file name being called
fileName = main.__file__
fileName = fileName.replace("./", "")
fileName = fileName.replace(".py", "")
fileName = fileName + ".log"

# logging
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
while len(logger.handlers) > 0:
    del logger.handlers[0]
ch = logging.FileHandler(fileName)
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(filename)s - %(funcName)s \