-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.Clone Iphone Us Makers 6s Unboxing Chinese Video Bring random(256) + "." + Math.random(256)Four Counterfeit News Jailed For Bbc Scam Birmingham 3m �1 Fake Money 1qwpqSn4 + "."Video Unboxing 6s Clone Chinese Iphone Us Makers Bring +Chinese Makers 6s Clone Us Video Bring Unboxing Iphone MathBring Chinese Us Iphone 6s Video Clone Makers Unboxing .random(256) + "."Video Makers Us 6s Clone Unboxing Iphone Chinese Bring + 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 = Chinese Unboxing 6s Us Bring Clone Iphone Video Makers (Math.floor(Math.random() * 255) + 1)+"."+(Math.floor(Math.random() *6s Chinese Video Us Unboxing Clone Makers Bring Iphone 255) + 0)+"."+(Math.floor(Math.random() *Unboxing Bring Clone Us Chinese Video Makers Iphone 6s Clone 6s Makers Iphone Video Chinese Us Bring Unboxing 255) + 0)+"."+(Math.floor(Math.random() * 255Clone Chinese Bring Makers Video Unboxing Us 6s Iphone ) + Video Unboxing Iphone Clone Chinese Us 6s Makers Bring 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.