Answer the question
In order to leave comments, you need to log in
Can there be empty JS for 1 GB?
Today we were digging with the advertising department in the files of our site, we found a 1 GB java script. In the source code - it is nowhere to be found, and the site was raised recently - this month, and the script dates back to the last change as early as February of this year. Mysticism, and that's all, but when you open it through any editor - only emptiness (scary). Has anyone experienced something similar?
Answer the question
In order to leave comments, you need to log in
It is unlikely that there is emptiness there, since most likely the file does not have time to be uploaded to the RAM. And so there are several options:
1) Wrong file extension
2) Someone created an empty blob file and put the jsa extension on it for fun
it is better to check for non-spaces in the file automatically and not with your eyes, set the wc utility on it (it will tell you how many words are in it, that is, everything between spaces) and lines
, you can change the 'extra' spaces in the script to single ones with a simple sed script and see that there really is
Gigabyte js, this can be a resource bomb for ddos of your site (for example, the web server is configured to compress files on the fly, i.e. network traffic will not be spent as a result, but server resources for returning an empty file will be huge)
sed -e 's/ */ /g' src.js > dst.js
Can there be empty JS for 1 GB?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question