Skip to content

Conversation

@HalilDeniz
Copy link

Summary:

This pull request adds the ability to limit the number of packets sent during a DoS attack and gracefully terminates the program when the specified packet limit is reached or when the user interrupts with Ctrl+C.

Key Changes:

  • Introduced a max_packets option that allows the user to specify the maximum number of packets to send.
  • Modified the attack function to check for the packet count limit and stop the attack once the limit is reached.
  • Implemented a clean shutdown mechanism using a stop_event flag. This ensures that all threads stop correctly, either when the maximum packet count is reached or when the user interrupts the process.
  • Updated user prompts to include input for the maximum packet count.
  • Provided a more user-friendly message when the program is terminated.

Reason for Change:

The original version of the tool lacked the ability to limit the number of packets sent, which could lead to unwanted continuous attacks. This feature is crucial for better control and responsible use of the tool, as well as ensuring that the program terminates gracefully in multi-threaded environments.

Please review the changes, and feel free to suggest any improvements. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant