drawbridge/README.md

52 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2023-06-29 22:51:14 -07:00
<div align="center">
<img src="drawbridge.png" alt="drawbridge Logo">
# drawbridge
2023-07-03 00:43:49 -07:00
**drawbridge** simplifies local nfqueue queues
2023-06-29 22:51:14 -07:00
2023-07-03 00:43:49 -07:00
without sacrificing performance?<br/>
2023-06-29 22:51:14 -07:00
[Installation](#installation) •
[Examples](#examples) •
[Contributing](#contributing) •
[License](#license)
</div>
## Installation
### with pip
2023-07-03 00:43:49 -07:00
Eventually, install with `pip install drawbridge`, maybe.
2023-06-29 22:51:14 -07:00
2023-07-03 00:43:49 -07:00
For now, clone the repo, navigate to it, and run `pip install .`. You'll need a Linux system for nfqueue.
2023-06-29 22:51:14 -07:00
2023-07-03 00:43:49 -07:00
## Examples
2023-06-29 22:51:14 -07:00
2023-07-03 00:43:49 -07:00
See the examples directory for a WebSocket example.
2023-06-29 22:51:14 -07:00
2023-07-03 00:43:49 -07:00
```python
from drawbridge import DrawBridge
2023-06-29 22:51:14 -07:00
2023-07-03 00:43:49 -07:00
def my_packet_handler(raw_packet):
# do things to the raw packet, like
# from scapy.all import *
# pkt = IP(raw_packet)
# ...
# return bytes(pkt)
return raw_packet
2023-06-29 22:51:14 -07:00
2023-07-03 00:43:49 -07:00
db = DrawBridge()
db.add_queue(my_packet_handler, src_port=80)
db.run()
```
2023-06-29 22:51:14 -07:00
## Contributing
If you would like to contribute to this project, feel free to submit a pull request or open an issue on GitHub.
This tool was written as part of my coursework for CSC 842 - Security Tool Development at Dakota State University. Consequently, I may choose not to maintain this tool beyond the length of the course, but have selected a license that enables open contributions in any case.
## License
This project is licensed under the MIT License. See the `LICENSE` file for details.