mirror of
https://github.com/joel16/3DSident.git
synced 2024-11-23 03:29:45 +00:00
Properly display security mode
This commit is contained in:
parent
63d9fce285
commit
5dca409085
@ -31,5 +31,6 @@ char * getScreenType(void);
|
||||
u64 getLocalFriendCodeSeed(void);
|
||||
u8 * getSerialNumber(void);
|
||||
u64 getSoapId(void);
|
||||
char * getSecurityMode();
|
||||
|
||||
#endif
|
@ -132,7 +132,9 @@ int main(int argc, char *argv[])
|
||||
printf("\x1b[32;1m*\x1b[0m WiFi 1 SSID: \x1b[32;1m%s\x1b[0m\n", ssid);
|
||||
|
||||
if (R_SUCCEEDED(ACI_GetPassphrase(passphrase)))
|
||||
printf("\x1b[32;1m*\x1b[0m WiFi 1 pass: \x1b[32;1m%s\x1b[0m\n\n", passphrase);
|
||||
printf("\x1b[32;1m*\x1b[0m WiFi 1 pass: \x1b[32;1m%s\x1b[0m\n", passphrase);
|
||||
|
||||
printf("\x1b[32;1m*\x1b[0m WiFi 1 security: \x1b[32;1m%s\x1b[0m\n\n", getSecurityMode());
|
||||
}
|
||||
|
||||
if (R_SUCCEEDED(ACI_LoadWiFiSlot(1)))
|
||||
@ -143,7 +145,9 @@ int main(int argc, char *argv[])
|
||||
printf("\x1b[32;1m*\x1b[0m WiFi 2 SSID: \x1b[32;1m%s\x1b[0m\n", ssid);
|
||||
|
||||
if (R_SUCCEEDED(ACI_GetPassphrase(passphrase)))
|
||||
printf("\x1b[32;1m*\x1b[0m WiFi 2 pass: \x1b[32;1m%s\x1b[0m\n\n", passphrase);
|
||||
printf("\x1b[32;1m*\x1b[0m WiFi 2 pass: \x1b[32;1m%s\x1b[0m\n", passphrase);
|
||||
|
||||
printf("\x1b[32;1m*\x1b[0m WiFi 2 security: \x1b[32;1m%s\x1b[0m\n\n", getSecurityMode());
|
||||
}
|
||||
|
||||
if (R_SUCCEEDED(ACI_LoadWiFiSlot(2)))
|
||||
@ -154,7 +158,9 @@ int main(int argc, char *argv[])
|
||||
printf("\x1b[32;1m*\x1b[0m WiFi 3 SSID: \x1b[32;1m%s\x1b[0m\n", ssid);
|
||||
|
||||
if (R_SUCCEEDED(ACI_GetPassphrase(passphrase)))
|
||||
printf("\x1b[32;1m*\x1b[0m WiFi 3 pass: \x1b[32;1m%s\x1b[0m\n\n", passphrase);
|
||||
printf("\x1b[32;1m*\x1b[0m WiFi 3 pass: \x1b[32;1m%s\x1b[0m\n", passphrase);
|
||||
|
||||
printf("\x1b[32;1m*\x1b[0m WiFi 3 security: \x1b[32;1m%s\x1b[0m\n\n", getSecurityMode());
|
||||
}
|
||||
|
||||
printf("\x1b[32;1m> Press any key to exit =)\x1b[0m");
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cfgs.h"
|
||||
#include "ac.h"
|
||||
#include "system.h"
|
||||
#include "utils.h"
|
||||
|
||||
@ -234,3 +234,26 @@ u64 getSoapId(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
char * getSecurityMode()
|
||||
{
|
||||
u8 securityMode = 0;
|
||||
|
||||
if (R_FAILED(ACI_GetSecurityMode(&securityMode)))
|
||||
securityMode = 8;
|
||||
|
||||
static char * securityString[] =
|
||||
{
|
||||
"Not secured",
|
||||
"WEP 40-bit",
|
||||
"WEP 104-bit",
|
||||
"WEP 128-bit",
|
||||
"WPA TKIP",
|
||||
"WPA2 TKIP",
|
||||
"WPA AES",
|
||||
"WPA2 AES",
|
||||
"Unknown"
|
||||
};
|
||||
|
||||
return securityString[securityMode];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user