Code Monkey home page Code Monkey logo

arp_scanner's Introduction

arp_scanner

A Flutter plugin for discovers devices on local network. It return IP v4 address, Mac Address,Interface Vendor and host name.

Limit

  • Plugin only support Android SDK Version 29 and below
  • The hostname resolve only work in 2.4G Wifi, otherwise return null

Usage

To use this plugin, add arp_scanner as a dependency in your pubspec.yaml file.

build.gradle for App

Change compileSdkVersion of build.gradle build script to 29.

android {
    ....
    compileSdkVersion 29
    ....
}

build.gradle for project

Change kotlin version of build.gradle build script to 1.5.30 or newer.

buildscript {
  ...
  ext.kotlin_version = '1.5.30'
  ...
}

Example

The example You can find here.

Update Mac vendor database

Clone repo to local. Then

 go mod tidy 
 go run createMacVendorDB.go

Add local repo as your project dependency after Mac vendor database is updated.

Fix Duplicate class com.google.gson

android {
  configurations {
    all {
      exclude module:'gson'
    }
  }
}

arp_scanner's People

Contributors

myfreax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

arp_scanner's Issues

Question about readme

In the Limit part of the readme it is written that

Plugin only support Android Sdk Version 29

I am unsure what it means as most of the time functionality isn't available only for one API version.
Most of the time, it has been added to that API and support from that API forward.
Or it got removed from the API and was supported until that API version.

Can you clarify if it is:

  1. Plugin only support Android SDK Version 29 and above
  2. Plugin only support Android SDK Version 29 and below
  3. The only API version supported is on Android SDK Version 29 and nothing else.

Unhandled Exception: MissingPluginException

════════ Exception caught by services library ══════════════════════════════════
The following MissingPluginException was thrown while activating platform stream on channel arp_scanning:
MissingPluginException(No implementation found for method listen on channel arp_scanning)

When the exception was thrown, this was the stack
#0      MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:154
<asynchronous suspension>
#1      EventChannel.receiveBroadcastStream.<anonymous closure>
package:flutter/…/services/platform_channel.dart:486
<asynchronous suspension>
════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by services library ══════════════════════════════════
MissingPluginException(No implementation found for method listen on channel arp_scanFinished)
════════════════════════════════════════════════════════════════════════════════
  Future<void> scanNetwork() async {
    ArpScanner.onScanning.listen((Device device) {
       print("Mac:${device.mac} ip:${device.ip} hostname:${device.hostname} time:${device.time} vendor:${device.vendor} \n");
    });
    ArpScanner.onScanFinished.listen((List<Device> devices) {
      print("total: ${devices.length}");
    });

    await ArpScanner.scan();
    print('Done');
  }

Flutter 2.10.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision db747aa133 (8 days ago) • 2022-02-09 13:57:35 -0600
Engine • revision ab46186b24
Tools • Dart 2.16.1 • DevTools 2.9.2

arp_scanner: 1.2.7

flutter build error

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':arp_scanner:kaptDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction
java.lang.reflect.InvocationTargetException (no error message)

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 2s
Exception: Gradle task assembleDebug failed with exit code 1

Easy points on pub dev

It looks like by adding a little more description in pubspec.yaml we can get more points in pub.dev page.

Currently there is "no description"

description: A new flutter plugin project.

We can change it to the first line from the readme file which is 126 characters

A Flutter plugin for discovers devices on local network. It return IP v4 address, Mac Address,Interface Vendor and host name.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.