How to get the correct js content?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • markleo
    New Member
    • May 2022
    • 7

    How to get the correct js content?

    when I check this link:
    [Z{Link redacted by moderation}]

    I get bellow messy code:



    how to get the correct format js content?
    Last edited by zmbd; May 16 '22, 10:31 PM. Reason: [z{Removed link - cannot verify safety of the site}][z{Moved thread to correct forum}]
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    Hello markleo,

    1) What you have appears to be a binary file - many stand-alone Hex-Editors that would let you see a more human readable format.
    Either this isn't the JS file you were trying to obtain, the author has used a minifier - I'm not familiar enough those to be able to advise you, or you have stumbled upon something nefarious - no way to really tell from our end.

    2) I could not verify the safety of the link you posted so I had to redact it from your post; however, I would advise you to contact the website owner to see if you can obtain the actual JS-File.

    3) Externally linked image files are not always visible to many of our experts - you might want to edit your message by using the advanced editor to upload the image to your post and then embed the image.

    Comment

    • sjain6
      New Member
      • Jun 2022
      • 2

      #3
      Hi,

      I had an equivalent Java issue, so I tackle it along these lines:

      The js record contains something like
      window.someVarF orReturn = 'content for return'
      On html
      Code:
      <script src="file.js"></script>
      <script>console.log(someVarForReturn)</script>
      For my situation the substance was html layout. So I followed through with something like this:

      On js record
      window.someVarF orReturn = '<did>My template</div>'
      On html
      Code:
      <script src="file.js"></script>
      <script>
      new DOMParser().parseFromString(someVarForReturn, 'text/html').body.children[0]
      </script>
      Regards -
      Last edited by zmbd; Jun 19 '22, 02:33 AM. Reason: [z{sjain6: Remove the link spam from your signature before your account is banned!! - Use the [CODE/] format for posted scripting!!}]

      Comment

      Working...