mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 02:39:44 +00:00
added simple random input tester for packet visualisation.
Need to supplement it with a better fuzz tester.
This commit is contained in:
parent
7c5c6b0826
commit
5824c38a28
@ -14,6 +14,26 @@ char *indent(int n)
|
||||
int senderSet=0;
|
||||
unsigned char senderAddress[32];
|
||||
|
||||
#ifdef STANDALONE
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
int i,n;
|
||||
int len;
|
||||
unsigned char buff[8192];
|
||||
|
||||
for(n=0;n<1024;n++)
|
||||
{
|
||||
int i;
|
||||
len=random()%8192;
|
||||
for(i=0;i<len;i++) buff[i]=random()&0xff;
|
||||
|
||||
serval_packetvisualise(stdout,"Fuzz Test",buff,len);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int serval_packetvisualise_renderaddress(FILE *f,unsigned char *packet,int *ofs,int senderP)
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user