Log invalid BLE probe payload and pacing arguments
This commit is contained in:
1 parent
5957e01ae2
commit
b5addd8b05
1 file changed
+5
-2
@@ -74,9 +74,12 @@ int main(int argc, char** argv) {
|
||||
unsigned window = argc > 5 ? (unsigned)atoi(argv[5]) : 1;
|
||||
packet_size = argc > 6 ? (unsigned)atoi(argv[6]) : 1500;
|
||||
unsigned interval_ms = argc > 7 ? (unsigned)atoi(argv[7]) : 0;
|
||||
if (seconds < 1 || seconds > 300 || !packets || packets > 1000000 || !window || window > 64 ||
|
||||
packet_size < 2 || packet_size > 1500 || interval_ms > 1000) return 2;
|
||||
debug_config_init(); debug_set_level(DEBUG_LEVEL_WARN); debug_set_category_level(DEBUG_CATEGORY_DISCOVERY, DEBUG_LEVEL_DEBUG);
|
||||
if (seconds < 1 || seconds > 300 || !packets || packets > 1000000 || !window || window > 64 ||
|
||||
packet_size < 2 || packet_size > 1500 || interval_ms > 1000) {
|
||||
DEBUG_ERROR(DEBUG_CATEGORY_DISCOVERY, "BLE probe invalid arguments seconds=%d packets=%u window=%u bytes=%u interval_ms=%u",
|
||||
seconds, packets, window, packet_size, interval_ms); return 2;
|
||||
}
|
||||
struct UASYNC* ua = uasync_create();
|
||||
struct SC_MYKEYS keys; if (!ua || sc_generate_keypair(&keys) != SC_OK) return 1;
|
||||
char priv[65], pub[65], config[512];
|
||||
|
||||
Reference in new issue
Block a user