在windows10/11中用Visual Studio Code開啟Claude AI,
可以直接用Claude寫code.
前置作業, 要先安裝好wsl在windows作業系統裡.
| STA Channel Width | Secondary Channel Offset | 說明 |
|---|---|---|
| 0 | 0 | 使用 20 MHz |
| 1 | 1(Above) | 使用 40 MHz,副頻道在上面 |
| 1 | 3(Below) | 使用 40 MHz,副頻道在下面 |
1. static struct nl_sock * nl_create_handle(struct nl_cb *cb, const char *dbg)
主要是看beacon的RSN information tag
根據chatgpt解說
Identifying WPA2 vs. WPA3[ 62%] Linking C static library libubusd_library.a toolchain-aarch64_xxx/bin/aarch64-openwrt-linux-ar: CMakeFiles/ubusd_library.dir/ubusd.c.o: plugin needed to handle lto object toolchain-aarch64_xxx/bin/aarch64-openwrt-linux-ar: CMakeFiles/ubusd_library.dir/ubusd_proto.c.o: plugin needed to handle lto object toolchain-aarch64_xxx/bin/aarch64-openwrt-linux-ar: CMakeFiles/ubusd_library.dir/ubusd_id.c.o: plugin needed to handle lto object
#include <stdio.h> #include <string.h> #include <stdlib.h> int main(int argc, char **argv) { const char * const str = "MAC-:AA-BB-CC-DD-EE-FF"; const char * const delimitation = "-:"; char * const dupstr = strdup(str); char *saveptr = NULL, *substr = NULL; int i = 0; printf("original: %s (%p)\n", dupstr, dupstr); substr = strtok_r(dupstr, delimitation, &saveptr); do { printf("#%d after parsing: %s (%p)\n", i++, substr, substr); substr = strtok_r(NULL, delimitation, &saveptr); } while (substr); } /* [Result] original: MAC-:AA-BB-CC-DD-EE-FF (0x55f73e1e42a0) #0 after parsing: MAC (0x55f73e1e42a0) #1 after parsing: AA (0x55f73e1e42a5) #2 after parsing: BB (0x55f73e1e42a8) #3 after parsing: CC (0x55f73e1e42ab) #4 after parsing: DD (0x55f73e1e42ae) #5 after parsing: EE (0x55f73e1e42b1) #6 after parsing: FF (0x55f73e1e42b4) */
#include <stdio.h> #include <string.h> #include <stdlib.h> int main() { int day, year; char weekday[20], month[20], tmp[100]; strcpy(tmp, "Saturday March aaa 25 1999"); /*"%*s" means ignore aaa*/ sscanf(tmp, "%s %s %*s %d %d", weekday, month, &day, &year); printf("%s %d %d %s", month, day, year, weekday); return(0); } /* [Result] March 25 1999 Saturday */
CONFIG_PACKAGE_libssh=y CONFIG_PACKAGE_libssh2=y