.c ip spoofing (ip range generate)

Hello

Writing an exploit our own system we've tested.

However, this exploit is currently producing a random string. However, we would like to produce a specific IP ranges.

now

IP 4.1.4.5> 127.0.0.1:
IP 2.7.4.1> 127.0.0.1:
IP 0.8.3.6> 127.0.0.1:
IP 9.5.1.4> 127.0.0.1:

it should be

IP 67.2.1.5> 127.0.0.1:
IP 67.53.8.4> 127.0.0.1:
IP 67.123.52.31> 127.0.0.1:
IP 67.241.11.64> 127.0.0.1:

now used .c files code

#ifdef RANDOMIZE_SOURCE_IP
syn->src = random();
#endif
syn->id = 1+255*((random()%256)|0xFF);
#ifdef RANDOMIZE_SOURCE_PORT
syn->sport = htons(1024 + (random() & 2048));


Thank you very much for your help.
Also I was wondering topic inet_addr to do with this process possible?
Is there someone who can help?
Topic archived. No new replies allowed.