summaryrefslogtreecommitdiffstats
path: root/tools/fuzz.c
blob: 39a2a4db60c048eafd5ff12ae4090913a26c3cee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <sys/types.h>

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>

int
main(void)
{
	time_t	t;
	int	i;

	setvbuf(stdout, NULL, _IONBF, 0);

	t = time(NULL);
	srandom((u_int) t);

	for (;;) {
		putchar('\033');

		for (i = 0; i < random() % 25; i++) {
			if (i > 22)
				putchar(';');
			else
				putchar(random() % 256);
		}

		/* usleep(100); */
	}
}