def add_system_info_ssh_keys_to_config(ssh_info): for user in ssh_info: ConfigService.creds_add_username(user['name']) # Public key is useless without private key if user['public_key'] and user['private_key']: ConfigService.ssh_add_keys(user['public_key'], user['private_key'], user['name'], user['ip'])
def add_system_info_ssh_keys_to_config(ssh_info): for user in ssh_info: ConfigService.creds_add_username(user["name"]) # Public key is useless without private key if user["public_key"] and user["private_key"]: ConfigService.ssh_add_keys(user["public_key"], user["private_key"], user["name"], user["ip"])
def add_system_info_creds_to_config(creds): for user in creds: ConfigService.creds_add_username(user) if 'password' in creds[user]: ConfigService.creds_add_password(creds[user]['password']) if 'lm_hash' in creds[user]: ConfigService.creds_add_lm_hash(creds[user]['lm_hash']) if 'ntlm_hash' in creds[user]: ConfigService.creds_add_ntlm_hash(creds[user]['ntlm_hash'])
def add_system_info_creds_to_config(creds): for user in creds: ConfigService.creds_add_username(creds[user]["username"]) if "password" in creds[user] and creds[user]["password"]: ConfigService.creds_add_password(creds[user]["password"]) if "lm_hash" in creds[user] and creds[user]["lm_hash"]: ConfigService.creds_add_lm_hash(creds[user]["lm_hash"]) if "ntlm_hash" in creds[user] and creds[user]["ntlm_hash"]: ConfigService.creds_add_ntlm_hash(creds[user]["ntlm_hash"])
def add_exploit_extracted_creds_to_config(telemetry_json): if 'credentials' in telemetry_json['data']['info']: creds = telemetry_json['data']['info']['credentials'] for user in creds: ConfigService.creds_add_username(creds[user]['username']) if 'password' in creds[user] and creds[user]['password']: ConfigService.creds_add_password(creds[user]['password']) if 'lm_hash' in creds[user] and creds[user]['lm_hash']: ConfigService.creds_add_lm_hash(creds[user]['lm_hash']) if 'ntlm_hash' in creds[user] and creds[user]['ntlm_hash']: ConfigService.creds_add_ntlm_hash(creds[user]['ntlm_hash'])
def add_exploit_extracted_creds_to_config(telemetry_json): if "credentials" in telemetry_json["data"]["info"]: creds = telemetry_json["data"]["info"]["credentials"] for user in creds: ConfigService.creds_add_username(creds[user]["username"]) if "password" in creds[user] and creds[user]["password"]: ConfigService.creds_add_password(creds[user]["password"]) if "lm_hash" in creds[user] and creds[user]["lm_hash"]: ConfigService.creds_add_lm_hash(creds[user]["lm_hash"]) if "ntlm_hash" in creds[user] and creds[user]["ntlm_hash"]: ConfigService.creds_add_ntlm_hash(creds[user]["ntlm_hash"])