Пример #1
0
def get_available_users():
    global module_session
    # Get available users with interactive shell
    payload = "cat /etc/passwd | grep -E \"/bin/bash|/bin/sh\" | cut -d':' -f1"
    shell_users = module_session.get_command_result(payload)
    print(f"Shell Users: "+shell_users)
    shm.assign_computer_info(module_session.name,'Shell Users',shell_users)
Пример #2
0
def get_kernel_version():
    global module_session
    kernel = module_session.get_command_result('hostnamectl | grep Kernel')
    print(kernel.strip())
    shm.assign_computer_info(module_session.name,'Kernel',kernel.strip())
Пример #3
0
def get_release():
    global module_session
    release = module_session.get_command_result('cat /etc/os-release')
    print(release)
    shm.assign_computer_info(module_session.name,'Release',release)
Пример #4
0
def get_os():
    global module_session
    os = module_session.get_command_result('uname -a')
    print(f"OS: "+os)
    shm.assign_computer_info(module_session.name,'OS',os)
Пример #5
0
def get_architecture():
    global module_session
    arch = module_session.get_command_result('uname -m')
    print(f"Arch: "+arch)
    shm.assign_computer_info(module_session.name,'Architecture',arch)
Пример #6
0
def get_hostname():
    global module_session
    hostname = module_session.get_command_result('hostname')
    print(f"Hostname: "+hostname)
    shm.assign_computer_info(module_session.name,'Hostname',hostname)