Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Interesting Javascript
Index -> General Discussion
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Dragon20942




PostPosted: Sun Mar 29, 2015 6:52 pm   Post subject: Interesting Javascript

Any idea why this doesn't work anymore? http://compsci.ca/v3/viewtopic.php?t=27363

Tony @ Sat Jan 22, 2011 1:05 pm wrote:
Dragon20942 @ Fri Jan 21, 2011 8:43 pm wrote:
variable concatenation

You guys might get a kick out of this

code:

($=[$=[]][(__=!$+$)[_=-~-~-~$]+({}+$)[_/_]+($$=($_=!''+$)[_/_]+$_[+$])])()[__[_/_]+__[_+~$]+$_[_]+$$](_/_)

(add "javascript:" at the start and paste into the address bar to run)

with explanation at http://adamcecc.blogspot.com/2011/01/javascript.html
Sponsor
Sponsor
Sponsor
sponsor
Zren




PostPosted: Sun Mar 29, 2015 8:02 pm   Post subject: RE:Interesting Javascript

Probably an increase in browser security against bookmarklets (javascript executed in the url bar).

Open up the browser's console and try running it there (Ctrl+Shift+J on chrome).
Tony




PostPosted: Sun Mar 29, 2015 9:10 pm   Post subject: RE:Interesting Javascript

Zren is likely right, JavaScript security is a big issue. At some point Facebook attempted to even disable browser's console ( http://stackoverflow.com/questions/21692646/how-does-facebook-disable-the-browsers-integrated-developer-tools ) because too many people were falling for a scam that involved them running arbitrary javascript on their logged in account (this effectively gives your account away).

That particular piece of Javascript (from 4+ years ago) no longer works (at least not in Chrome), but if you poke around the explanation link, you can probably fix it.

Quote:

$=[$=[]]
-> [Array[0]]
(__ = !$ + $)
-> "falsefunction $(selector, [startNode]) { [Command Line API] }"

This now behaves differently, but you also get a lot more different characters from a string then just "false".

Previously they were coding only with letters from "false", "true", and "object".
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
melissarubbe




PostPosted: Mon May 04, 2015 2:38 am   Post subject: Re: RE:Interesting Javascript

Zren @ Sun Mar 29, 2015 8:02 pm wrote:
Probably an increase in browser security against bookmarklets (javascript executed in the url bar).

Open up the browser's console and try running it there (Ctrl+Shift+J on chrome).


Does this code can be apply for firefox as well?
Zren




PostPosted: Mon May 04, 2015 9:45 am   Post subject: RE:Interesting Javascript

Opening developer tools is usually F12 on any browser. The console should be somewhere in there. If not, it'll be somewhere in the menu.
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: