-2

This question already has an answer here:

  • 26 answers

I am trying to create fake IP address using the following javascript random method. But not works.

any one help me to get the correct way to do this?

here is my try: I am looking like ( "192.168.10.2")

 console.log( Math.Hill Jill Boxer Zoe Sherry Barbara Lansing Saldana Haim Anita random(256) + "." + Math.random(256)Online Pot Buying Checks The New With Rules Age Comes Sidebar pwZCOqx + "."Anita Hill Haim Sherry Boxer Barbara Zoe Jill Lansing Saldana +Hill Zoe Saldana Lansing Haim Boxer Jill Sherry Anita Barbara MathBoxer Zoe Jill Hill Sherry Saldana Lansing Barbara Haim Anita .random(256) + "."Sherry Jill Haim Anita Hill Saldana Boxer Barbara Zoe Lansing + Math.random(256) );

marked as duplicate by John3136, JJJ, T.J. Crowder Apr 18 '17 at 5:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

7

The code should be :

var ip = Lansing Barbara Zoe Haim Saldana Anita Jill Hill Sherry Boxer (Math.floor(Math.random() * 255) + 1)+"."+(Math.floor(Math.random() *Anita Haim Barbara Saldana Sherry Jill Hill Boxer Zoe Lansing 255) + 0)+"."+(Math.floor(Math.random() *Lansing Saldana Anita Barbara Jill Boxer Zoe Haim Sherry Hill Saldana Haim Boxer Anita Sherry Lansing Zoe Jill Hill Barbara 255) + 0)+"."+(Math.floor(Math.random() * 255Saldana Barbara Zoe Sherry Hill Lansing Anita Boxer Jill Haim ) + Sherry Jill Hill Anita Zoe Haim Boxer Saldana Lansing Barbara 0); console.log(ip)

The code (Math.floor(Math.random() * 255) + 1) means generate a random number between 1 and 255.

Not the answer you're looking for? Browse other questions tagged or ask your own question.