Chleba / netscanner

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

Can't run on Debian #20

Closed JonDoe841 closed 6 months ago

JonDoe841 commented 6 months ago

so im not sure how much this "bug" is actually a bug and how much it's caused by me not knowing what to do because im fairly new so after installing rust with curl and using the command cargo install netscanner i have it but the second i run "netscanner" in my terminal it crashes with this issues "Unable to create datalink channel: Operation not permitted (os error 1)" and it tells me to report. i checked other issues here to see if any of them are similar and maybe the MacOS? and if the problem is that i need to run an interface what type to use?as of now im using it just on the terminal and if I am fast i can see the UI for a split second maybe

Chleba commented 6 months ago

Hi, Thank you for your question. I'm on vacation at the moment but I will take a look on it right when I come back. Thank you for waiting.

JonDoe841 commented 6 months ago

no worries man enjoy the vacation

Chleba commented 6 months ago

Hi, Did you try to run it with sudo please ? netscanner is using iw for scanning wifi networks so that would usually fix that problem. If there is unable to create a datalink error, there may be no active interface found.

ifconfig | pcregrep -M -o '^[^\t:]+(?=:([^\n]|\n\t)*status: active)'

if you can pass me the output from this bash it would help to solve Your problem. Thanks.

Chleba commented 6 months ago

and if the problem is that i need to run an interface what type to use?

Btw. Interface in this case means Network Interface. You may have a virtual network bridge that could be selected for scanning and a wifi interface, you may also be connected with an ethernet cable to different routers\ and have different subnet. So we're talking about network interfaces in this case. That is why and where the datalink is throwing an error.

JonDoe841 commented 6 months ago

Sorry for the wait so I have tried to run it with sudo but it comes up with no command found the syntax is "sudo netscanner" then it asks for passwd and then it shows "sudo: netscanner: command not found" as for the output of what you asked me to type i have only 2 and they are "bash: pcregrep: command not found" and on the next line "bash: ifconfig: command not found" so that's where i am at the moment im not sure if it will help but it seems that it runs twice? or at least i get 2 error msg both same just with a different locations at the end if you need that info i will be checking here from time to time

Chleba commented 6 months ago

Hi, If you installed netscanner via cargo then it's location will be on path ~/.cargo/bin/netscanner. You need to add this path into .bashrc PATH.

JonDoe841 commented 6 months ago

Hi So how do i do that exactly? i have tried to do it temporally but both export PATH="netscanner:$PATH" and export PATH="~/.cargo/bin/netscanner:$PATH" dont do anything i did do it permanently (i hope i have done it right) by using vim .bashrc and adding export PATH="~/.cargo/bin/netscanner:$PATH" at the end of the line and now when i use echo $PATH it does show but nothing has changed so im thinking i have done it wrong

Chleba commented 6 months ago

@JonDoe841 - into a path you have to add only the directory So edit .bashrc as you do but remove netscanner string. So - export PATH="~/.cargo/bin:$PATH" That's for looking for executable binaries in the provided paths.

JonDoe841 commented 6 months ago

i have done that change but there is no difference in any command i try to use and when using echo $PATH i get the ~/.cargo/bin: but also i get a /home/ME/.cargo/bin: that was there from before or does that have nothing to do with it?

Chleba commented 6 months ago

so few questions:

JonDoe841 commented 6 months ago

No worries with eng not being my first language i was afraid that will happen.

I do hope this helps clear things up

Chleba commented 6 months ago

You're sudoers are wrongly configured. You can do a few things that I will list here, but sorry You have to google a lot of it yourself. I cannot teach you here how to use Linux and many other stuff. Here I need to solve the issues around netscanner only and I am sorry about that.

Let me know when you make some progress with it. Thanks

JonDoe841 commented 6 months ago

Well Chleba thank you i do understand so don't worry for that but i am writing for an update upon using su then using netscanner it works. i will look more into the info you have given me to see what is happening there so thanks for the heads up but again thank you for your time and again it is working if I enter su then use the netscanner take care and i hope you make a lot of other awesome tools

Chleba commented 6 months ago

Hi, I should think of that before so that we could verify if it's working. As mentioned in README - this program needs root privileges. Your issue is only in your user's privileges & paths. Glad I could help you clarify it. Thanks

Valdanitooooo commented 6 months ago
sudo cp .cargo/bin/netscanner /usr/local/bin
sudo netscanner

work for me :smile: