42Ensure (attack, comm_send_status_returns_neg1_for_null_args)
55Ensure (attack, comm_send_status_error_if_hostname_too_big)
65 long_host = g_malloc (2049);
66 for (index = 0; index < 2049; index++)
67 long_host[index] =
'a';
68 long_host[2048] =
'\0';
76Ensure (attack, comm_send_status_sends_correct_text)
79 struct kb_operations kb_ops_struct;
89 kb->kb_ops = &kb_ops_struct;
95 assert_that (strcmp (
given_name,
"internal/status"), is_equal_to (0));
96 assert_that (strcmp (
given_value,
"127.0.0.1/11/67"), is_equal_to (0));
108 suite = create_test_suite ();
110 add_test_with_context (suite, attack,
111 comm_send_status_returns_neg1_for_null_args);
112 add_test_with_context (suite, attack,
113 comm_send_status_error_if_hostname_too_big);
114 add_test_with_context (suite, attack, comm_send_status_sends_correct_text);
117 ret = run_single_test (suite, argv[1], create_text_reporter ());
119 ret = run_test_suite (suite, create_text_reporter ());
121 destroy_test_suite (suite);
static int comm_send_status(kb_t main_kb, char *ip_str, int curr, int max)
Sends the progress status of of a host's scan.