Chleba / netscanner

Terminal Network scanner & diagnostic tool with modern TUI
MIT License
865 stars 20 forks source link

Packaging for Kali Linux #27

Closed Arszilla closed 6 months ago

Arszilla commented 6 months ago

Hey @Chleba,

I am trying to package netscanner for Kali Linux so it can be added to Kali's repositories. To do this, I have to use the rustc and cargo packages from Debian Testing (Upstream), which uses rustc version 1.70.0.

As a result, clap and throbber-widgets-tui fail the build process, as they require rustc version 1.72.0. I can downgrade clap to 4.4.18 (from 4.5.1), which satisfies the version requirement you've set in Cargo.toml. However, downgrading throbber-widgets-tui is a problem, cargo doesn't really let me downgrade it from 0.4.1 to 0.3.0 (the version that supports rustc version 1.70.0). Downgrading it throws the following error:

cargo update -p throbber-widgets-tui@0.4.1 --precise 0.3.0
    Updating crates.io index
error: failed to select a version for the requirement `throbber-widgets-tui = "^0.4.1"`
candidate versions found which didn't match: 0.3.0

As a result, I wanted to ask if it's possible to downgrade throbber-widgets-tui to 0.3.0 to facilitate packaging. From what I can read from the changelogs, it should not really impact the functionality of netscanner.

TIA.

Chleba commented 6 months ago

I'll take a look at it ASAP. I may create my own spinner because I already started working on it before I even knew that this widget existed :).

Arszilla commented 6 months ago

Please let me know on what you decide. As long as it's on Cargo.toml and compatible with rustc version 1.70.0, it should be fine for me to package. Worst case, if it is "open ended" like clap, I can just use the version that fits the criteria that is compatible with .1.70.0.

Chleba commented 6 months ago

I am in the middle of implementing open TCP ports scanning but I will put this aside and fix the throbber issue with version v0.4.5 because that will take at least another week if I get some spare time for it. I would love to have my tool in legendary Kali Linux :). I love that distro :heart:

Chleba commented 6 months ago

Hi @Arszilla, I removed the throbber widget along with another not-used ping crate and implemented a very simple spinner solution for Your packing issue. Here is the fix: https://github.com/Chleba/netscanner/commit/5127ebd0994e84a3dcb43c564ba94ed51f9902b7 I will publish the new version v0.4.5 so that You may continue with Your packing. Thanks a lot for Your work and I would like to ask you to close this issue if this fix will solve it.

Chleba commented 6 months ago

Btw. I'm closing this Issue, please feel free to reopen it if Your Issue persists in the new version v0.4.5. Thanks.

Arszilla commented 6 months ago

Hey @Chleba

I built netscannersuccessfully, and I was able to test it on a "basic" level:

image

There are two interesting bits though:

EDIT

The packaged netscanner is available at https://gitlab.com/Arszilla/netscanner - I'll submit a ticket later tonight or this week to the Kali Team to include it in their repositories.

Chleba commented 6 months ago

Hi @Arszilla, Thanks for the information. To clarify some of your points of interest:

Next thing - cargo build is really for debugging. If you want to build release version you need additional flag for that call: cargo build --release. That way binary will be in /target/release/.

Arszilla commented 6 months ago
  • those "embedded libraries" just from the look (I did confirm this after looking at them properly) says that:

    • ieee-data is for oiu-id of device MAC address to get vendor of those devices that I visualize in Discovery table after I ping that device
    • libyaml is for parsing and emitting YAML files that are needed for build this binary

I am assuming my guess of using ieee-data and libyaml-0-2 Debian packages should be all that's required - assuming these libraries have been linked properly to the FHS (like under /usr/share/ etc.

I believe I did have the same thing when I did use cargo build --release or maybe I just got lost in the chaos, and overlooked it. I'll fix that and submit a ticket in a few hours to bugs.kali.org.

Friendly suggestion: Maybe come up with some nice long and short versions of describing the tool? For now I just wrote "Network scanner" and your checklist from README.md for long description. It could be better and more informative IMO :)

Chleba commented 6 months ago

Thank You. Also thanks for Your suggestion. I will create a better description for this tool. It is too generic, but that is what is supposed to be :). I am trying to have an all-in-one tool to see every information about my network. I didn't like to use dozens of commads to see my local IP, IPs of other clients on my network, wifi networks, etc. and in some way, I'm trying to get some inspiration from Wireshark :). So idk. I'm just playing with Rust if I'm being honest. I love it and I'm trying to see what is happening on my homelab that I'm building. So please - if you have ANY other suggestions or ideas for making this tool more usable, functional, or better - please let me know. Create an Issue with a feature suggestion or a discussion and I will be happy to implement that in the future :).