Skip to content

Commit

Permalink
Implement the version() function for pybind
Browse files Browse the repository at this point in the history
  • Loading branch information
rafael-santiago committed Sep 9, 2023
1 parent fbeca6e commit 5423f75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/BINDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/binds/py/macgonuts_pybind.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 5423f75

Please sign in to comment.