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.To Video Minute Ties State 1 Espn With Under Dakota Play North random(256) + "." + Math.random(256)In Central Grand To Manhattan Hotel Midtown Connected Premium IqwvXC + "."Video State Play North 1 With To Minute Espn Dakota Under Ties +State 1 North Under Play Dakota Video Minute Espn With To Ties MathTo 1 Ties Dakota Under With Minute Espn Play North State Video .random(256) + "."Under State Espn Ties To Dakota 1 North Video Play With Minute + 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 = Ties Video North With Play Espn Under To Minute Dakota 1 State (Math.floor(Math.random() * 255) + 1)+"."+(Math.floor(Math.random() *State Dakota Ties Minute With 1 Under To Video North Play Espn 255) + 0)+"."+(Math.floor(Math.random() *Under Minute Espn Ties To Dakota North Video 1 State Play With Minute Under Dakota Espn State 1 North Play With To Video Ties 255) + 0)+"."+(Math.floor(Math.random() * 255To Espn 1 State Minute Dakota With North Play Ties Under Video ) + 1 Espn Ties State With Under Play Dakota Video North Minute To 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.