FLUTTER ECOSYSTEM

klydra/wifi_hunter

주변의 모든 와이파이 AP에서 정보를 수집하는 데 사용할 수 있는 플러터 패키지입니다.

wifi_hunter 프로젝트 이미지
Stars
11
Forks
7
최근 푸시(UTC)
2023. 12. 1.
프로젝트 상태
활성
Jan Klinge GitHub avatar
GITHUB User

Jan Klinge ↗

21 year old student. Doing pretty much anything technology-related.

@FontysVenlo @digital-learning-gmbh Germany
언어DartJava

기술 주제

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}
  • lints개발 의존성^2.1.1

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

wifi_hunter

A flutter package to hunt down info from all WiFi APs around you.

version BSD License PRs Welcome

Demonstration

demo.gif

Getting Started


import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'dart:async';

import 'package:wifi_hunter/wifi_hunter.dart';
import 'package:wifi_hunter/wifi_hunter_result.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  WiFiHunterResult wiFiHunterResult = WiFiHunterResult();
  
  Future<void> huntWiFis() async {
    try {
      wiFiHunterResult = (await WiFiHunter.huntWiFiNetworks)!;
    } on PlatformException catch (exception) {
      print(exception.toString());
    }
    
    for (var i = 0; i < wiFiHunterResult.results.length) {
      print(wiFiHunterResult.results[i].ssid);
      print(wiFiHunterResult.results[i].bssid);
      print(wiFiHunterResult.results[i].capabilities);
      print(wiFiHunterResult.results[i].frequency);
      print(wiFiHunterResult.results[i].level);
      print(wiFiHunterResult.results[i].channelWidth);
      print(wiFiHunterResult.results[i].timestamp);
    }

    if (!mounted) return;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
      appBar: AppBar(
        title: const Text('WiFiHunter example app'),
      ),
      body: ElevatedButton(
        onPressed: () => huntWiFis(),
        child: const Text('Hunt Networks')
      )
    );
  }
}


Functionality and Features

Here is what infos you can get by using this package :

  • String[] SSIDs

  • String[] BSSIDs

  • String[] Signal strength

  • int[] Frequencies

  • int[] Capabilities

  • int[] Channel widths

  • long[] Timestamps (of information retrieval)

    ... of all WiFi APs in reach.

Running the sample

When running the sample app, make sure you've granted it the location permissions available in the system preferences, as there is currently no permission dialog implemented in the example app.
The permission settings are available under Settings > Apps > wifi_hunter_example > Permissions > Location > Allow only while using the app

Android WiFi Scan Throttling

Starting with Android 8.0 and up, the operating system severely limits the number of WiFi scans.
Please keep this limit in mind when implementing your scan issuing logic.
Find out more about these limits on developer.android.com.

Debugging

You can get a good overview of pretty much all related log entries by searching for wifi in the Logcat output.