예제 #1
0
def get_linux_data(ip, usr, pwd):
    if mod_linux:
        lock.acquire()
        print '[+] Collecting data from: %s' % ip
        lock.release()
        linux = ml.GetLinuxData(
            base_url, username, secret, ip, ssh_port, timeout, usr, pwd,
            use_key_file, key_file, get_serial_info,
            add_hdd_as_device_properties, add_hdd_as_parts, add_nic_as_parts,
            get_hardware_info, get_os_details, get_cpu_info, get_memory_info,
            ignore_domain, ignore_virtual_machines, upload_ipv6,
            give_hostname_precedence, debug, get_oracle_software)

        data = linux.main()
        if debug:
            lock.acquire()
            print '\nLinux data: '
            for rec in data:
                print rec
            lock.release()
        if DICT_OUTPUT:
            return data
        else:
            # Upload -----------
            upload(data, os='linux')
예제 #2
0
def get_linux_data(ip, usr, pwd):
    if mod_linux:
        lock.acquire()
        print '[+] Collecting data from: %s' % ip
        lock.release()
        linux = ml.GetLinuxData(ip, ssh_port, timeout, usr, pwd, use_key_file,
                                key_file, get_serial_info,
                                add_hdd_as_device_properties, add_hdd_as_parts,
                                get_hardware_info, get_os_details,
                                get_cpu_info, get_memory_info, ignore_domain,
                                upload_ipv6, give_hostname_precedence,
                                get_dv_install_info, debug)

        data = linux.main()
        print "value debug: %s" % debug
        if debug:
            lock.acquire()
            #print '\nLinux data: '
            for rec in data:
                print rec
            lock.release()
        if DICT_OUTPUT:
            return data
        else:
            # Upload -----------
            # upload(data)
            print {ip: data}
예제 #3
0
def get_linux_data(ip, usr, pwd):
    if MOD_LINUX:
        lock.acquire()
        print '[+] Collecting data from: %s' % ip
        lock.release()
        linux = ml.GetLinuxData(BASE_URL, USERNAME, SECRET, ip, SSH_PORT,
                                TIMEOUT, usr, pwd, USE_KEY_FILE, KEY_FILE,
                                GET_SERIAL_INFO, GET_HARDWARE_INFO,
                                GET_OS_DETAILS, GET_CPU_INFO, GET_MEMORY_INFO,
                                IGNORE_DOMAIN, UPLOAD_IPV6,
                                GIVE_HOSTNAME_PRECEDENCE, DEBUG)

        data = linux.main()
        if DEBUG:
            lock.acquire()
            print 'Linux data: ', data
            lock.release()
        if DICT_OUTPUT:
            return data
        else:
            # Upload -----------
            upload(data)