Skip to content

Commit

Permalink
Merge pull request #12 from r-richter/v0.6_dev
Browse files Browse the repository at this point in the history
V0.6 dev
  • Loading branch information
r-richter authored Jun 20, 2020
2 parents a07a275 + 277654d commit f474581
Show file tree
Hide file tree
Showing 52 changed files with 551 additions and 470 deletions.
51 changes: 0 additions & 51 deletions ChangeLog

This file was deleted.

33 changes: 33 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## Version 0.6 (Jun. 20th, 202)
- Code refactoring
- Enhanced user interface
- Dispatcher can now be started from every state\
\
[Source Code](https://github.com/r-richter/hyenae-ng/releases/tag/v0.6)

## Version 0.05 (Jun. 19th, 2020)
- Bug fixes
- Code refactoring
- Enhanced user interface\
\
[Source Code](https://github.com/r-richter/hyenae-ng/releases/tag/v0.5)

## Version 0.04 (Jun. 17th, 2020)
- Implemented ARP-Support\
\
[Source Code](https://github.com/r-richter/hyenae-ng/releases/tag/v0.4)

## Version 0.03 (Jun. 15th, 2020)
- Implemented ICMPv4-Support
- Implemented ICMPv6-Support\
\
[Source Code](https://github.com/r-richter/hyenae-ng/releases/tag/v0.3)

## Version 0.02 (Jun. 14th, 2020)
- Implemented TCP-Support
- Implemented UDP-Support\
\
[Source Code](https://github.com/r-richter/hyenae-ng/releases/tag/v0.2)

## Version 0.1 (Jun. 12th, 2020)
- First public release
9 changes: 0 additions & 9 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# Hyenae NG

Contact : [email protected]\
Homepage : https://github.com/r-richter/hyenae-ng
\
\
Copyright (C) 2020 Robin Richter


## Prerequisites

In order to build and install Hyenae NG from source, you first need to make
Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# Hyenae NG

Contact : [email protected]\
Homepage : https://github.com/r-richter/hyenae-ng
\
\
Copyright (C) 2020 Robin Richter

## About

Hyenae NG (Next Generation) is a re-write of the original Hyenae tool which
was originally published back in the year 2010.

Expand All @@ -19,8 +11,10 @@ you to effectively set up even complex stress-tests or attacks scenarios
within seconds.

![Main Menu](msc/main_menu.png "Main Menu")
![Main Menu](msc/ip_v4_setup.png "Main Menu")
![Main Menu](msc/start_dispatcher.png "Main Menu")
![IPv4 Setup](msc/ip_v4_setup.png "IPv4 Setup")
![Start Dispatcher](msc/start_dispatcher.png "Start Dispatcher")

Copyright (C) 2020 Robin Richter

## Features

Expand Down Expand Up @@ -157,3 +151,8 @@ of a few basic patterns:

- Decremental IPv6 address between `:FFFF` and `:FF00`:
`1000:2000:3000:4000:5000:6000:7000:FF--`

## Contact

- [E-Mail](mailto:[email protected])
- [GitHub-Repository](https://github.com/r-richter/hyenae-ng)
5 changes: 1 addition & 4 deletions include/frontend/console/console_app_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ namespace hyenae::frontend::console
console_io* get_console() const;
console_app_state* get_parent() const;
void enter();
void enter(console_app_state* parent);
virtual bool run() = 0;
void back();

protected:
void set_parent(console_app_state* parent);

}; /* console_app_state */

Expand Down
13 changes: 6 additions & 7 deletions include/frontend/console/console_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,16 @@ namespace hyenae::frontend::console
public:
void header_out(string_t title);
void separator_out(bool nl_before, bool nl_after);
void menu_item_separator_out(bool nl_before, bool nl_after);

void menu_item_out(
size_t pos,
const string_t& choice,
bool selected,
string_t caption,
string_t hint,
string_t info,
size_t highest_index,
bool nl_before = false);
const string_t& caption,
const string_t& hint,
const string_t& info,
size_t item_count);

// TODO: Refactor info & error out to use common code base
void info_out(string_t message, bool menu_item_margin = false);
void error_out(string_t message, bool menu_item_margin = false);
void task_out(string_t name);
Expand Down
28 changes: 23 additions & 5 deletions include/frontend/console/console_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define CONSOLE_MENU_H

#include "console_io.h"
#include "console_app_state.h"

namespace hyenae::frontend::console
{
Expand All @@ -41,52 +42,69 @@ namespace hyenae::frontend::console
friend class console_menu;

private:
string_t _choice;
bool _selected;
string_t _caption;
string_t _hint;
string_t _info;

public:
item();

item(
const string_t& caption,
const string_t& hint = "",
const string_t& info = "");

bool is_selected() const;
void set_selected(bool selected);
string_t get_choice() const;
string_t get_caption() const;
void set_caption(const string_t& caption);
string_t get_hint() const;
void set_hint(string_t hint);
string_t get_info() const;
void set_info(string_t info);

private:
void set_choice(const string_t& choice);

}; /* item */

private:
console_io* _console_io;
console_app_state* _start_state;
console_app_state* _calling_state;
console_app_state* _parent_state;
vector_t<item*> _items;
item* _start_state_item = NULL;
item* _parent_state_item = NULL;
string_t _title;
string_t _error_message;
string_t _info_message;
string_t _last_error;

public:
console_menu(console_io* console_io, const string_t& title);
console_menu(
console_io* console_io,
const string_t& title,
console_app_state* calling_state,
console_app_state* parent_state);

~console_menu();
void add_item(item* item);
item* prompt(item* default_choice = NULL);
void select_all(bool selected);
string_t get_info_message() const;
void set_info_message(string_t message);
string_t get_error_message() const;
void set_error_message(string_t message);
console_app_state* get_start_state() const;
void set_start_state(console_app_state* state);
item* get_start_state_item() const;
item* get_parent_state_item() const;

private:
void item_out(size_t pos, item* item, bool nl_before);
void item_out(item* item);
item* choice_in(item* default_choice);
size_t item_choice_pos(item* item);

}; /* console_menu */

Expand Down
1 change: 0 additions & 1 deletion include/frontend/console/states/arp_frame_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ namespace hyenae::frontend::console::states
console_menu::item* _sender_proto_addr_pattern_item = NULL;
console_menu::item* _target_hw_addr_pattern_item = NULL;
console_menu::item* _target_proto_addr_pattern_item = NULL;
console_menu::item* _back_item = NULL;
data_generator_t* _generator = NULL;
uint16_t _operation;
string_t _sender_hw_addr_pattern;
Expand Down
3 changes: 2 additions & 1 deletion include/frontend/console/states/dispatcher_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "../../../../include/model/random_duration_generator.h"
#include "../../../../include/frontend/console/console_menu.h"
#include "../../../../include/frontend/console/console_app_state.h"
#include "../../../../include/frontend/console/states/startable_state.h"

namespace hyenae::frontend::console::states
{
Expand All @@ -40,6 +41,7 @@ namespace hyenae::frontend::console::states
class main_menu;

class dispatcher_setup :
public startable_state,
public console_app_state
{
using limits_t = hyenae::model::data_dispatcher::limits;
Expand All @@ -61,7 +63,6 @@ namespace hyenae::frontend::console::states
console_menu::item* _packet_limit_item = NULL;
console_menu::item* _duration_limit_item = NULL;
console_menu::item* _send_delay_item = NULL;
console_menu::item* _back_item = NULL;
limits_t* _limits;
delay_t* _delay;
delay_type _delay_type;
Expand Down
1 change: 0 additions & 1 deletion include/frontend/console/states/ethernet_frame_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ namespace hyenae::frontend::console::states
console_menu::item* _type_item = NULL;
console_menu::item* _add_fcs_item = NULL;
console_menu::item* _payload_item = NULL;
console_menu::item* _back_item = NULL;
data_generator_t* _generator = NULL;
bool _add_preamble_sfd;
string_t _src_mac_pattern;
Expand Down
1 change: 0 additions & 1 deletion include/frontend/console/states/generator_selector.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ namespace hyenae::frontend::console::states
generator_setup*> _menu_items;

console_menu::item* _none_item = NULL;
console_menu::item* _back_item = NULL;
console_menu::item* _selected_item = NULL;
generator_setup* _selected_setup = NULL;

Expand Down
2 changes: 2 additions & 0 deletions include/frontend/console/states/generator_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@

#include "../../../../include/model/data_generator.h"
#include "../../../../include/frontend/console/console_app_state.h"
#include "../../../../include/frontend/console/states/startable_state.h"

namespace hyenae::frontend::console::states
{
/*---------------------------------------------------------------------- */

class generator_setup :
public startable_state,
public console_app_state
{
friend class generator_selector;
Expand Down
1 change: 0 additions & 1 deletion include/frontend/console/states/icmp_echo_payload_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ namespace hyenae::frontend::console::states
console_menu* _menu = NULL;
console_menu::item* _id_pattern_item = NULL;
console_menu::item* _seq_num_pattern_item = NULL;
console_menu::item* _back_item = NULL;
data_generator_t* _generator = NULL;
string_t _id_pattern;
string_t _seq_num_pattern;
Expand Down
1 change: 0 additions & 1 deletion include/frontend/console/states/icmp_v4_frame_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ namespace hyenae::frontend::console::states
console_menu::item* _type_item = NULL;
console_menu::item* _code_item = NULL;
console_menu::item* _payload_item = NULL;
console_menu::item* _back_item = NULL;
data_generator_t* _generator = NULL;
uint8_t _type;
uint8_t _code;
Expand Down
1 change: 0 additions & 1 deletion include/frontend/console/states/icmp_v6_frame_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ namespace hyenae::frontend::console::states
console_menu::item* _type_item = NULL;
console_menu::item* _code_item = NULL;
console_menu::item* _payload_item = NULL;
console_menu::item* _back_item = NULL;
data_generator_t* _generator = NULL;
uint8_t _type;
uint8_t _code;
Expand Down
1 change: 0 additions & 1 deletion include/frontend/console/states/ip_v4_frame_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ namespace hyenae::frontend::console::states
console_menu::item* _src_ip_pattern_item = NULL;
console_menu::item* _dst_ip_pattern_item = NULL;
console_menu::item* _payload_item = NULL;
console_menu::item* _back_item = NULL;
data_generator_t* _generator = NULL;
uint8_t _type_of_service;
string_t _id_pattern;
Expand Down
1 change: 0 additions & 1 deletion include/frontend/console/states/ip_v6_frame_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ namespace hyenae::frontend::console::states
console_menu::item* _src_ip_pattern_item = NULL;
console_menu::item* _dst_ip_pattern_item = NULL;
console_menu::item* _payload_item = NULL;
console_menu::item* _back_item = NULL;
data_generator_t* _generator = NULL;
uint8_t _traffic_class;
string_t _flow_label_pattern;
Expand Down
2 changes: 0 additions & 2 deletions include/frontend/console/states/main_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ namespace hyenae::frontend::console::states
console_menu::item* _output_setup_item = NULL;
console_menu::item* _generator_selector_item = NULL;
console_menu::item* _dispatcher_setup_item = NULL;
console_menu::item* _start_dispatcher_item = NULL;
console_menu::item* _exit_item = NULL;
states::output_setup* _output_setup = NULL;
states::generator_selector* _generator_selector = NULL;
states::dispatcher_setup* _dispatcher_setup = NULL;
Expand Down
Loading

0 comments on commit f474581

Please sign in to comment.