I have access to a website for testing purposes. I know the code of the site and am testing it with owner permissions. The code is similar to the below
var something= "{USER INPUT}'
result = eval((something));
So with SSJS I can amend this to effectively read
var something= "fs.readFileSync('/somewhere/file.txt',null)"
result = eval((something));
This outputs the contents to the screen further down the line, which is fine. However, doing the same on a ZIP file gives me all odd characters e.g
PK�coG���^�*file.txt
Now, the file looks very close to a local ZIP file I have. It starts off with PK
and the contains the file name. However, in the Node version, there's lots of blank square boxes and black boxes with question marks.
Any advice on how to grab the contents of a ZIP file properly?