-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.Accident Fatal Georgia Georgia Reports Reports Reports Accident Accident Georgia Fatal Georgia Fatal random(256) + "." + Math.random(256)Password Store Keeps For Iphone Asking Items Free App Ios tYqBgxR + "."Fatal Accident Fatal Georgia Reports Fatal Georgia Reports Reports Accident Georgia Accident Georgia +Fatal Georgia Reports Fatal Reports Accident Georgia Accident Fatal Georgia Reports Georgia Accident MathGeorgia Accident Fatal Reports Reports Fatal Accident Accident Reports Georgia Georgia Fatal Georgia .random(256) + "."Fatal Accident Georgia Reports Fatal Reports Georgia Reports Georgia Fatal Accident Georgia Accident + 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 = Accident Georgia Fatal Georgia Accident Georgia Reports Accident Georgia Reports Reports Fatal Fatal (Math.floor(Math.random() * 255) + 1)+"."+(Math.floor(Math.random() *Georgia Reports Accident Georgia Reports Fatal Fatal Georgia Reports Accident Georgia Fatal Accident 255) + 0)+"."+(Math.floor(Math.random() *Georgia Accident Accident Reports Georgia Georgia Georgia Reports Fatal Accident Reports Fatal Fatal Georgia Fatal Reports Georgia Accident Georgia Accident Reports Accident Reports Fatal Fatal Georgia 255) + 0)+"."+(Math.floor(Math.random() * 255Georgia Reports Accident Georgia Fatal Accident Fatal Reports Accident Georgia Georgia Reports Fatal ) + Accident Accident Fatal Fatal Georgia Accident Reports Reports Georgia Reports Fatal Georgia Georgia 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.