Hide this in your coworkers' JavaScript code tomorrow
gist.github.com
Hide this in your coworkers' JavaScript code tomorrow
1–10 of 40 posts
Re: Hide this in your coworkers' JavaScript code tomorrow
#2Re: Hide this in your coworkers' JavaScript code tomorrow
#3Re: Hide this in your coworkers' JavaScript code tomorrow
#4Re: Hide this in your coworkers' JavaScript code tomorrow
#5On a related note, I got a pleasent surprise when I opened the Developer Console on Facebook.com: they present you with a giant red warningp[1] and block any code execution in it until you explicitly 'allow [your] account to be hijacked if I paste malicious Javascript'[2] [1]: http://i.imgur.com/6UVaTen.png [2]: https://www.facebook.com/selfxss
http://stackoverflow.com/questions/21692646/how-does-faceboo...
Re: Hide this in your coworkers' JavaScript code tomorrow
#6A silly prank, but it makes me wonder: has anyone implemented an antivirus/anti-problem scanner for open source code? i.e. scan the source code on a git repository and report any suspicious code that matches known malicious patterns? Lint, but targeted at detecting likely security flaws and code injections.
I've received a few such emails. Its a good way to market developer tools.
Re: Hide this in your coworkers' JavaScript code tomorrow
#7 if (false) {
var GLOBALVAR;
}
somewhere in the code.It's fun (in a harmless fun kinda way, but you can also use some really dirty tricks to really hamper someone's work) to fuck up people's code - that's why I wrote Underhanded JavaScript. :P
EDIT:
Another fun one is to add `return`s to constructor functions.
Re: Hide this in your coworkers' JavaScript code tomorrow
#8A silly prank, but it makes me wonder: has anyone implemented an antivirus/anti-problem scanner for open source code? i.e. scan the source code on a git repository and report any suspicious code that matches known malicious patterns? Lint, but targeted at detecting likely security flaws and code injections.
Then there's the problem that you've got how many languages you need to scan against? And no quick way to determine what language a project is implemented in? Sure, you could add some sort of language detection in there but then you're adding to the overhead.
Finally, if the project has any sort of real complexity, some of the best areas to exploit would be in the integrations between two technology surfaces. Writing a tool to look for problems in a single contained module is one thing, writing a tool that can find problems in the interfaces between modules is quite a bit more complicated.
I think your "anti-problem" scanning tool would be the best avenue to pursue though. Maybe some sort of tool that would run on "checkin/pull-request" and look for issues like introduced buffer-overflow potential and things like that.
I think it's just easier to rely on solid projects with "known" contributors to police themselves and hope for the best, as bad as that may sound. Still, if you could create such a tool you'd make a fortune and improve the world immensely, so don't let my nay-saying stop you.
Re: Hide this in your coworkers' JavaScript code tomorrow
#9.. but in reality, I had a serious issue with Qt once: #ifndef TRUE #define TRUE true #define FALSE false #endif
Now this screwed up some other library's similar definitions...
Re: Hide this in your coworkers' JavaScript code tomorrow
#10Also note that `string.split('').reverse().join('')` is not a very good way to reverse a string in JavaScript. See http://mathiasbynens.be/notes/javascript-unicode#reversing-s...