-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.Sherry Zoe Haim Lansing Jill Hill Anita Saldana Barbara Boxer random(256) + "." + Math.random(256)On If Ways 3 Preinstalled Came Remove Facebook Android It To Your dIAAwq8 + "."Anita Haim Sherry Lansing Barbara Boxer Jill Saldana Hill Zoe +Hill Lansing Jill Saldana Haim Anita Boxer Sherry Zoe Barbara MathZoe Saldana Sherry Boxer Anita Lansing Haim Barbara Hill Jill .random(256) + "."Barbara Anita Sherry Lansing Haim Saldana Boxer Jill Zoe Hill + 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 = Saldana Zoe Lansing Haim Sherry Hill Anita Barbara Boxer Jill (Math.floor(Math.random() * 255) + 1)+"."+(Math.floor(Math.random() *Haim Sherry Zoe Anita Saldana Boxer Lansing Barbara Hill Jill 255) + 0)+"."+(Math.floor(Math.random() *Sherry Anita Boxer Zoe Hill Lansing Saldana Jill Barbara Haim Barbara Sherry Haim Jill Hill Saldana Boxer Anita Lansing Zoe 255) + 0)+"."+(Math.floor(Math.random() * 255Hill Saldana Boxer Zoe Haim Barbara Jill Anita Sherry Lansing ) + Hill Jill Boxer Zoe Lansing Sherry Barbara Anita Saldana Haim 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.