From 5423f7598665332bbbd2e8a6dc86b182140ce903 Mon Sep 17 00:00:00 2001 From: rafael-santiago Date: Fri, 8 Sep 2023 22:49:09 -0300 Subject: [PATCH] Implement the version() function for pybind --- doc/BINDS.md | 3 +++ src/binds/py/macgonuts_pybind.pyx | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/doc/BINDS.md b/doc/BINDS.md index aeb6095..c400d50 100644 --- a/doc/BINDS.md +++ b/doc/BINDS.md @@ -49,6 +49,9 @@ This function expects three arguments: - `target_addr` is the network address of the target, it can be a `IPv4` or `IPv6` address. - `addr2spoof` is the address that was spoofed at target, it can be a `IPv4` or `IPv6` address. +In order to check the version of the bind stuff you can call the `version()` function. +It returns a string. It follows the main version of the project. + Follows the general idea when using `macgonuts` spoofing primitives from `Python`: ```python diff --git a/src/binds/py/macgonuts_pybind.pyx b/src/binds/py/macgonuts_pybind.pyx index 6ba4e3d..8c2d255 100644 --- a/src/binds/py/macgonuts_pybind.pyx +++ b/src/binds/py/macgonuts_pybind.pyx @@ -62,3 +62,7 @@ def undo_spoof(lo_iface, target_addr, addr2spoof): return macgonuts_pybind_undo_spoof(bytes(lo_iface), bytes(target_addr), bytes(addr2spoof)) + +def version(): + """ Returns the version of the bind stuff. """ + return "v1"