Giter Club home page Giter Club logo

uproot's People

Contributors

actions-user avatar geekvisit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

uproot's Issues

Option to allow leases without FQDN ?

Just found your great tool.. wondering if it would be easy to add an option that doesn't require a fully qualified host name (with domain).

eg don't reject "router" and only accept "router.domain.com"

README.md - OpenWRT Export Description Incorrect

Great software!

Using the example REAME.md writeup to export & convert the static leases for an OpenWRT router caused the utility to exit abnormally with error messages.

Incorrect syntax: grep -hnr -A3 "config host" /etc/config/dhcp > static_leases.openwrt

Suggest to change this to: cat /etc/config/dhcp > static_leases.openwrt

Presence of DUID field crashes uproot

Version:

uprt (2021.10.001 running on windows "Windows 10 Pro" 10.0 (Build 19043))

I exported openwrt leases using

grep -hnr -A4 "config host" /etc/config/dhcp

My configuration contains entries with duid in addition to mac such as this one:

115:config host
116-    option mac 'FC:44:82:AA:AA:AA'
117-    option dns '1'
118-    option duid '000100012774439a540xxxxxxxxx'
119-    option ip '192.168.1.244'

They crash uproot. If I remove these entries, export finishes fine.
Error output:

> .\uprt.exe .\duid.openwrt -g j
Uprt converting files ...
Scanning duid.openwrt...
Error:#0      _GrowableList.[] (dart:core-patch/growable_array.dart:254)
#1      ValidateLeases.removeBadLeases (package:uprt/src/validate_leases.dart:175)
#2      OpenWrt.getLeaseMap (package:uprt/src/open_wrt.dart:124)
#3      Converter.getSourceLeaseMap (package:uprt/src/converter.dart:228)
#4      Converter.toJson (package:uprt/src/converter.dart:260)
#5      Converter.toOutput (package:uprt/src/converter.dart:70)
#6      Converter.convertFileList (package:uprt/src/converter.dart:29)
#7      main (file:///g:/users/david/documents/mega/projects/dart/convert-ddwrt/cli/bin/uprt.dart:74)
#8      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:281)
#9      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184)

Not all OpenWRT versions use 3 lines for host definitions

Keeping 3 lines after config host is not enough for some versions of OpenWRT. For OpenWrt SNAPSHOT r12235-49caf9f98a, /etc/config/dhcp contains at least 4 lines for each host config. As a result, OpenWRT export instructions don't work for these configurations. Changing 3 to 4 fixes the issue in my case, but I'm not sure if this will work for everybody:

grep -hnr -A4 "config host" /etc/config/dhcp > static_leases.openwrt

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.