Math.random()
function in Googlebot produces a fully deterministic series of numbers. I wrote a small script that uses this bug to accurately identify the googleblock:Math.random()
from the goblobot, the result will always be 0,14881141134537756
, the second call will always return 0,19426893815398216
. The script on the link above simply uses this information to identify the Google bot, although it obfuscates its actions a little so that they do not look too arbitrary.0,14881141134537756
returned more than 18,000 results, so the constant seems pretty stable. Finding this out, I googled a bit more and found an old comment on Hacker News from KMag:At some point, someone from SEO found out that random () always returns 0.5. I'm not sure that anyone realized that JavaScript always saw some date from the summer of 2006, but I assume that the situation has changed.
random()
always returned 0,5
, and now it produces deterministic series of numbers. The date is actually set exactly at the beginning, but then it can go to the future. KMag further said:I hope that now they have set a random starting number and date, using a cryptographic hash of all the loaded scripts and the text of the page, so that it will be deterministic, but it will be difficult to manipulate them.
Source: https://habr.com/ru/post/348914/
All Articles