Skip to content

Commit

Permalink
Merge pull request #15 from rafael-santiago/add-version-function-to-p…
Browse files Browse the repository at this point in the history
…ybind

Implement the version() function for pybind
  • Loading branch information
rafael-santiago authored Sep 9, 2023
2 parents fbeca6e + 5423f75 commit 9b05a8a
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 9b05a8a

Please sign in to comment.