Ejemplo n.º 1
0
class Informational_Scan(object):
    def __init__(self):
        self.temp_list = []
        self.gsi = Gather_System_Info()
        self.lines = "--" * 35

    def build_up_system_info(self):
        """
        Starts building up some system info
        """
        # Print put system time
        system_time = datetime.today().strftime('%Y-%m-%d--%H:%M:%S')
        print self.lines
        print "[+] System Time: %s" % system_time
        # Print some info about the processor
        print "[+] Processor info: %s " % self.gsi.return_platform_info()
        # Print out the computer hostname
        print "[+] Hostname: %s" % self.gsi.return_hostname()
        # Print out home directories
        print "[+] Home Directories Present: "
        for i in self.gsi.return_home_dirs():
            print "\t[-]%s" % i
        print self.lines
        # Print OS Version
        print "[+] OS Version: %s " % self.gsi.return_os_version()
        # Print OS Build
        print "[+] OS Build: %s " % self.gsi.return_os_build()
        # Print OS Name
        print "[+] OS Name: %s" % self.gsi.return_os_version_name().capitalize(
        )
        # Print shutdown and reboot status.
        print self.lines
        print "[+] Shutdown history: "
        for i in self.gsi.show_last_shutdown():
            print "\t[-] %s" % i
        print self.lines
        print "[+] Reboot history: "
        for i in self.gsi.show_last_reboot():
            print "\t[-] %s " % i
        print self.lines
        # Print out wireless networks
        for wifi in self.gsi.return_wireless_networks():
            print "[+] %s" % wifi.strip()

    def main(self):
        self.build_up_system_info()
Ejemplo n.º 2
0
 def __init__(self):
     self.temp_list = []
     self.gsi = Gather_System_Info()
     self.lines = "--" * 35
Ejemplo n.º 3
0
class System_Information_Scan(object):
    def __init__(self):
        self.temp_list = []
        self.GSI = Gather_System_Info()
        self.lines = "--" * 35

    def _create_output(self, key, value):
        """
        Internal method to clean up the random print statments.
        """
        print "[+] %s %s" % (key, value)

    def acquire_system_info(self):
        """
        Gather information about the system, siilar to info scan."
        """
        print "\n\n\tSystem Informational Scan"
        print self.lines
        system_time = datetime.today().strftime('%Y-%m-%d--%H:%M:%S')
        self._create_output('Current System Type', system_time)
        self._create_output('CPU', self.GSI.return_platform_info())
        self._create_output('Hostname', self.GSI.return_hostname())
        print self.lines
        self._create_output('OS Version:', self.GSI.return_os_version())
        self._create_output('OS Build:', self.GSI.return_os_build())
        self._create_output('OS Name:',
                            self.GSI.return_os_version_name().capitalize())
        print self.lines
        for mount in self.GSI.return_diskspace():
            self._create_output('Disk Space:', mount)
        print self.lines
        self._create_output(self.GSI.return_system_memory(), '')
        self._create_output(self.GSI.return_uuid(), '')
        self._create_output(self.GSI.return_macos_serial_number(), '')
        print self.lines
        for i in self.GSI.return_processor_speed():
            self._create_output(i.strip(), '')
        print self.lines
        for i in self.GSI.return_other_very_random_info():
            print i
        print self.lines

        # TODO FINEEESH THIS.

    def main(self):
        """
        Start it up!
        """
        self.acquire_system_info()
Ejemplo n.º 4
0
class Informational_Scan(object):

    def __init__(self):
        self.temp_list = []
        self.gsi = Gather_System_Info()
        self.lines = "--" * 35

    def _create_output(self, key, value):
        """
        Internal method to clean up the random print statments.
        """
        print "[+] %s: %s" % (key, value)

    def build_up_system_info(self):
        """
        Starts building the output for the info scan.
        """
        print "\n\n\tInformation Scan"
        print self.lines
        # Obtain the system time
        system_time = datetime.today().strftime('%Y-%m-%d--%H:%M:%S')
        # System up time
        for i in self.gsi.return_system_uptime():
            self._create_output('System Uptime', i)
        print self.lines
        # Return logged in users
        for i in self.gsi.return_logged_in_users():
            self._create_output('Logged in Users:', i)
        print self.lines
        self._create_output('System Time', system_time)
        self._create_output('Processor Info', self.gsi.return_platform_info())
        self._create_output('Hostname', self.gsi.return_hostname())
        print self.lines
        for h_dir in self.gsi.return_home_dirs_with_paths():
            self._create_output('Home Directories', h_dir)
        print self.lines
        self._create_output('OS Version', self.gsi.return_os_version())
        self._create_output('OS Build', self.gsi.return_os_build())
        self._create_output('OS Name', self.gsi.return_os_version_name().capitalize())
        print self.lines
        for shutdown in self.gsi.show_last_shutdown():
            self._create_output('Shutdown History', shutdown)
        print self.lines
        for restart in self.gsi.show_last_reboot():
            self._create_output('Reboot History', restart)
        print self.lines
        for wifi in self.gsi.return_wireless_networks():
            self._create_output('Wireless', wifi)
        print self.lines
        for open_file in self.gsi.return_open_with_internet():
            self._create_output('Open Files with Internet', open_file)
        print self.lines
        # For loop over the gsi.return_list_of_users()
        # and then use that to run gsi.return_crons()
        for user in self.gsi.return_list_of_users():
            self.gsi.return_cron_tab(user)
        # Present any screen sessions.
        print self.lines
        for screen in self.gsi.return_any_screen_sessions():
            self._create_output('Screen Session', screen)

    def main(self):
        """
        Lets start this thing up.
        """
        self.build_up_system_info()