1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

The curious case of a strange JavaScript code

Discussion in 'JavaScript' started by Phil S, Jul 22, 2018.

  1. #1
    A few months back, I have stumbled upon this "bit" of scripting that blew my mind (attached).

    The output, believe it or not, is this string : "God has left us, and it's because of JavaScript."

    What's going on here? How does this work? I suspect it to be some weird and hacky way to encode it to binary or something.
    SEMrush
     

    Attached Files:

    Phil S, Jul 22, 2018 IP
    SEMrush
  2. sarahk

    sarahk iTamer Staff

    Messages:
    25,183
    Likes Received:
    3,428
    Best Answers:
    100
    Trophy Points:
    665
    #2
    cute, I imagine it's playing with binary
     
    sarahk, Jul 22, 2018 IP
  3. hdewantara

    hdewantara Active Member

    Messages:
    437
    Likes Received:
    37
    Best Answers:
    19
    Trophy Points:
    80
    #3
    I give up; I spent about 30 minutes trying to de-obfuscate it without any success. If God left us, does that mean Lucifer is peeking from inside? :eek:
     
    hdewantara, Jul 22, 2018 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    8,924
    Likes Received:
    1,625
    Best Answers:
    232
    Trophy Points:
    515
    #4
    deathshadow, Jul 24, 2018 IP
    sarahk likes this.
  5. arto8

    arto8 Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #5
    prepared this stroke
    ƒ anonymous(
    ) {
    document.write("<body style='background-color: white'><p>God has left us, and it's because of JavaScript.</p></body>");
    }
     
    arto8, Nov 1, 2018 IP