summaryrefslogtreecommitdiffstats
path: root/util/fuzz.c
blob: 3e52655843a97c2abb693fbd215bf87cd3a45ac0 (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);
	}
}