From c0de444ea39d38b1e3dde20f323ca3ca0dcd698f Mon Sep 17 00:00:00 2001 From: ms264556 <29752086+ms264556@users.noreply.github.com> Date: Mon, 26 Jun 2023 01:51:38 +0100 Subject: [PATCH] add aioruckus sample code --- pages/ExtractRuckusAdminUserPass.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pages/ExtractRuckusAdminUserPass.md b/pages/ExtractRuckusAdminUserPass.md index 8a26017..d77a1d0 100644 --- a/pages/ExtractRuckusAdminUserPass.md +++ b/pages/ExtractRuckusAdminUserPass.md @@ -7,7 +7,7 @@ Use this script if you've forgotten the login details for your Ruckus Unleashed/ ## Bash script (using Python) -Paste this script into a shell, to create the extraction function:- +Paste this script into a bash shell, to create the extraction function:- ```bash function ruckus_getadmin { RUCKUS_BAK="$1" python3 - <") as session: + admin = (await session.api.get_system_info(SystemStat.ALL))["admin"] + print(f"{admin['username']}: {admin['password']}") +asyncio.run(print_admin_user()) +``` + +