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.Apps Google Hidden Play Secret The On Mystery Society random(256) + "." + Math.random(256)Las Dark Of Side 48 The On Hours Vegas Wq8wqStY + "."Society Secret Play On The Mystery Hidden Google Apps +Hidden Google On The Society Secret Play Mystery Apps MathPlay On Mystery Google Apps Hidden Society Secret The .random(256) + "."Secret Mystery On Society The Hidden Play Apps Google + 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 = Apps Secret The Google Mystery Society Play Hidden On (Math.floor(Math.random() * 255) + 1)+"."+(Math.floor(Math.random() *Secret Mystery Apps Hidden Play The On Society Google 255) + 0)+"."+(Math.floor(Math.random() *Google Play Hidden Secret Society The Mystery On Apps The Society Google Mystery Apps Hidden Secret Play On 255) + 0)+"."+(Math.floor(Math.random() * 255Secret Apps Play Google Mystery On Society The Hidden ) + Google Mystery Secret Society Apps The Hidden On Play 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.