A
A
asche9452021-07-13 17:42:02
JavaScript
asche945, 2021-07-13 17:42:02

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

3 answer(s)
K
kirillinyakin, 2021-07-13
@kirillinyakin

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

R
rPman, 2021-07-13
@rPman

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

P
profesor08, 2021-07-13
@profesor08

Can there be empty JS for 1 GB?

Maybe if needed.
If you want to know the contents, read it line by line. A couple of lines of code for such an operation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question