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 ( "")

 console.log( Math.Exclusive Singer For Returning Footloose Remake Lori Moviehole random(256) + "." + Math.random(256)News Fraud Cbs As Fallout Continues Of Target Emerge Incidents 8FqZUT + "."Returning Moviehole For Remake Footloose Exclusive Lori Singer +Footloose Singer Remake Lori Moviehole For Exclusive Returning MathFor Footloose Remake Singer Returning Moviehole Exclusive Lori .random(256) + "."Returning Footloose For Singer Moviehole Lori Exclusive Remake + 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.


The code should be :

var ip = Moviehole Lori Singer Footloose Returning Remake For Exclusive (Math.floor(Math.random() * 255) + 1)+"."+(Math.floor(Math.random() *Moviehole For Exclusive Lori Remake Singer Footloose Returning 255) + 0)+"."+(Math.floor(Math.random() *Moviehole Remake Lori Exclusive For Returning Singer Footloose Footloose Exclusive Singer Lori Returning Remake For Moviehole 255) + 0)+"."+(Math.floor(Math.random() * 255For Singer Moviehole Footloose Exclusive Returning Remake Lori ) + Moviehole Remake Lori Singer Exclusive For Returning Footloose 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.