Skip to content

Commit

Permalink
Switch from pip to uv and bump Scapy dependency: 2.4.4 → 2.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bwaldvogel committed Dec 29, 2024
1 parent e1bf021 commit 641cf02
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

.idea/

virtualenv*
.venv/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8
24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
## Layer 2 network neighbourhood discovery tool ##
## Layer 2 Network Neighbourhood Discovery Tool ##

Tool to discover hosts in your network using ARP pings.
See also [this question on stackoverflow.com][3]
Easily detect hosts on your local network by sending ARP pings.
For additional information, see [this Stack Overflow question][3].

## Dependencies ##

* Python 2.7 or 3.4+
* Python 3.8+
* [scapy][1] for networking functions like [arping][2]

## Installation ##
## Installation and Usage ##

Either install a recent [scapy][1] with your package manager,
or setup a [virtual environment][4]:
When [scapy][1] is installed as system library, simply run:

```
$ virtualenv virtualenv
$ source virtualenv/bin/activate
$ pip install -r requirements.txt
$ sudo ./neighbourhood.py [-i <interface>]
```

## Usage ##
Alternatively, you can use [uv][4]:

```
$ sudo ./neighbourhood.py [-i <interface>]
$ uv sync
$ sudo uv run neighbourhood.py [-i <interface>]
```

## TODO ##
Expand All @@ -33,4 +31,4 @@ $ sudo ./neighbourhood.py [-i <interface>]
[1]: https://scapy.net/
[2]: http://en.wikipedia.org/wiki/Arping
[3]: http://stackoverflow.com/questions/207234/list-of-ip-addresses-hostnames-from-local-network-in-python/
[4]: https://docs.python-guide.org/dev/virtualenvs/
[4]: https://github.com/astral-sh/uv
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[project]
name = "neighbourhood"
version = "0.1.0"
description = "Layer 2 network neighbourhood discovery tool that uses scapy "
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"scapy>=2.6",
]
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

22 changes: 22 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 641cf02

Please sign in to comment.