wizard college is going to kill me I swear to god. I just saw someone without a component satchel reach into their pocket and pull out a handful of LOOSE tapioca to use as a substitute for blood in their fell ritual. and it worked. I’ve never been so fucking mad.
Nari sent me on a quest to go get him flowers and I went for them. Afterwards Leshy made a request too afterwards to go find his eye and I like to think he wanted attention after he saw me give some to Nari
Ah, I never pass up an opportunity to bring up JSFuck.
The idea is simple: how many keys do you really need? Do you really need an entire keyboard just to code in JavaScript? How many letters can we remove, pry away from your IDE, and still write a valid program?
The answer is a few too many.
Let’s start with the empty array [ ], it’s as good a place as any. The unary plus +[ ] converts it to the number 0. But why stop there? Empty arrays are truthy (everything in javascript is truthy unless it’s one of the seven hard-coded falsy values), and so we can make booleans:
![] === false !![] === true +!![] === 1
(Don’t get ahead of yourself though, the expression [ ] == false still evaluates to true)
We can form any number, we just need to keep adding 1 until we get there. Luckily, there’s a better way. I mean don’t get me wrong,
!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]
absolutely does equal 10 and you should absolutely put it in production, but it’s a bit unwieldy. Wouldn’t it be easier to just write a 1 and a 0 next to eachother?
Good news! Using the plus operator on arrays concatenates their contents. So we can just write [1] + [0] to get “10” (yes, as a string, adding arrays outputs strings). And our old friend the unary plus turns this into a number, like so:
+([1]+[0]) === 10 +([+!+[]]+[+[]]) === 10
Much more space efficient. Much more practical. JavaScript is begging us to stop. We will not.
“Eggshells!” I hear you cry, “we don’t have any letters! How do I write an if statement without any letters!”
Good question! By only using the six characters [ ] ( ) ! +, what can we do that will return a letter?
Well, the answer’s been in front of us the whole time, hasn’t it? Doesn’t ![ ] evaluate to false? That’s five perfectly good letters right there
“false”[1] === ‘a’ (false+[])[1] === 'a’ // adding things to arrays returns strings, remember? (![]+[])[+!![]] === 'a’
We’ve got a couple gimmies: false, true, NaN, undefined, and Infinity are all easily reachable. For more complex letters, we can index the string “function at() { [native code] }” that we get from [ ]+[ ][“at”]. Nothing can hold us back.
And all of this, the fucked up typing and indexing booleans and all of this brings us to our end goal. Our white whale. How do we turn a string into runnable code?
The answer is the Function constructor. Takes a string like “alert(1)”, returns that string as the runnable function alert(1). Since it’s the constructor of every function, all we need is to get any function within reach, and get its constructor. And since we can get Array.prototype.at()…
[][“at”][“constructor”](“alert(1)”)()
This is valid code. It will run alert(1) in your browser. All it takes is a couple square brackets, a couple parentheses, and some letters. And we have all the letters we need. Using only the six characters [ ] ( ) ! + we can write any piece of code we want.
So I leave you with this: a piece of code–valid JavaScript code–that you can run in the console of any modern browser:
(I made the above snippit with jscrew.it. Go try it!)
Oh yeah, reblog this version instead:
You can run this in the console of your browser. In practice, you really shouldn’t. If you want to, open a new tab and run it there.
The reason being is that even though I say this code alerts “Hello World” (and it does), I could easily be lying. This code could also just as easily steal your Tumblr authorization, and either a) post from your account, or without 2fa b) steal your account.
This is an extremely common scam, called a “self-XSS”, and most browsers warn you to not paste code you don’t know. Heed that warning! I wouldn’t recommend running the above code unless you really want to.
You can use a VM or Sandboxed browser (which is a browser running in a VM on someone else’s server) to run untrusted code. https://www.browserling.com/browser-sandbox has limited free sandboxed browsers. If you want to be extra safe you’d have to run your own isolated system (like a VM).
this is your random reminder to CHECK IF YOU’RE STILL HAVING FUN
are you enjoying scrolling tumblr? watching youtube? reading that book? playing that game? drawing that art? doing that activity? if not,
YOU CAN STOP AND DO SOMETHING ELSE
you don’t have to stick to something that you are doing for fun if it isn’t fun for you anymore. You can come back! If you’ve loved it before you are likely to love it again! but you can stop!
Don’t get stuck in a loop of doing something that you think should be fun when it isn’t! You can put it down for a bit! Maybe that’s the very thing that will make it fun again later!
if you spend your life bitching and complaining about the fact people are ‘expected’ to engage in the dreaded pointless banal “'small talk”’ instead of learning to trade pleasantries with the people around you, you will never know the true and heady joy of doing a dumb bit with a complete stranger and as a result your soul will remain small
i love how there’s the genre of fix-it fic where the author goes into great granular detail of how our heroes manage to avoid or undo whatever character death or other unpopular choice occurred, in a way that abides by the laws of the fictional universe and definitely required a substantial plot outline, and then there are fix-it fics where the author just went “that’s bullshit and didn’t happen,” and we as readers all go “agreed. carry on.”
Shinigami eyes is a browser extension that was meant to mark someone as trans friendly or not trans friendly, based on user data and guidelines. A username/site/etc would be marked as green if they were trans-friendly. Red meant not trans friendly.
Due to the developer (developers?) being a trans radfem (meaning they believe that anti transmasculity doesn’t exist and afab transfems are trolls (when the latter is usually intersex folks) and intersex people are inheritly anti-trams and “theyfab” isn’t a slur… etc.), SE has basically become useless. People who will call enbies “theyfabs” get marked green, while people who believe in anti-transmasculity or believe that sex isn’t binary get marked red.
babe. I know we’re all going thru a lot rn but I just wanna give u the heads up that sesame streets future is in jeopardy. hbo has chosen not to renew it for new episodes (a series that has been going since 1969) and the residents of 123 Sesame Street no longer have a home :(
n all seriousness sesame street is such an important piece of living media. it has been around for DECADES and from day 1 highlighted the importance of diversity empathy and education for children in a fun way. their mission statement is “Helping Kids Everywhere Grow Smarter, Stronger, and Kinder”. it’s been such an influence for so many people at a formative age. it’s creators made it w the intention that it could be a resource for underprivileged kids and help them prepare for kindergarten. thousands of people have learned english from our friends on sesame. pls (at media corporations) don’t let a beloved cultural phenomenon die
Would be lovely if people could spread this link to their donations page around the internet
but i stay silly :3 but i stay silly :3 but i stay silly :3 but i stay silly :3 but i stay silly :3 but i stay silly :3 but i stay silly :3 but i stay silly :3 but i stay sillybut i stay silly :3 but i stay silly but i stay silly :3
a post on here could be like “make sure you litter guys! the earth is actually adapting to digesting different kinds of materials if we stop littering we’re hurting it” and a good handful of you would reblog with “yiikes :0 didnt know this. followers make sure to throw your trash on the ground
god i hate how normalized diet culture and shit like bmi and calories are. bmi is based on eugenics. calories are a measurement of how much energy something gives u and not at all of how much weight or fat ull gain. diets have been proven to be harmful and ultimately unhelpful in actually losing weight. fatness has been largely proven to not be inherently unhealthy and doesnt inherently cause health issues.
if anyone has more good links to add on then please do and if anyone knows more on this stuff than me then dont hesitate to correct me!
FOOD IS GOOD. FOOD IS GOOD. FOOD IS GOOD!! if you’re eating, ever, and even/especially if it’s hard, know that i am personally SO SO proud of you
The BMI was invented by Adolphe Quetelet, the 19th century statistician who invented phrenologist anthropometry. He wasn’t just a eugenicist, he was one of the founding fathers of racist pseudoscience. Please do not listen to anything he has to say about your body.
“And get this: While epidemiologists use BMI to calculate national obesity rates (nearly 35 percent for adults and 18 percent for kids), the distinctions can be arbitrary. In 1998, the National Institutes of Health lowered the overweight threshold from 27.8 to 25—branding roughly 29 million Americans as fat overnight—to match international guidelines. But critics noted that those guidelines were drafted in part by the International Obesity Task Force, whose two principal funders were companies making weight loss drugs.”
I was hoping the full pc format issue the photo’s in was available online somewhere, but I did find this from a 2008 eurogamer interview instead, which is cute
I love birdwatchers they’re like “I just saw my ALL TIME FAVORITE BIRD SPECIES! I’ve always dreamed of seeing one in the wild! I am ECSTATIC!” and it’s the most boring looking little brown bird you’ve ever seen.
And I’m watching the video like “whoaaaa what’s it going to be! woodpecker? red-headed woodpecker? eastern whip-poor-will? northern mockingbird? it’s a Bachman’s sparrow? oh, okay. neat.”
I feel like I need to show you a Bachman’s sparrow for this post to truly land.
Oooooh the most bird ever.
omg this is so me my favourite bird is the short-toed treecreeper and.
like. yea…
I’m sorry to admit this and I would never do it in real life because I have an immense respect for wildlife and specifically the delicate nature of birds. That is the most grabbable animal I have ever seen. It looks free for the taking.
I love birdwatchers they’re like “I just saw my ALL TIME FAVORITE BIRD SPECIES! I’ve always dreamed of seeing one in the wild! I am ECSTATIC!” and it’s the most boring looking little brown bird you’ve ever seen.
And I’m watching the video like “whoaaaa what’s it going to be! woodpecker? red-headed woodpecker? eastern whip-poor-will? northern mockingbird? it’s a Bachman’s sparrow? oh, okay. neat.”
I feel like I need to show you a Bachman’s sparrow for this post to truly land.
Oooooh the most bird ever.
omg this is so me my favourite bird is the short-toed treecreeper and.
like. yea…
I’m sorry to admit this and I would never do it in real life because I have an immense respect for wildlife and specifically the delicate nature of birds. That is the most grabbable animal I have ever seen. It looks free for the taking.