News for hackers. Stuff that matters.
Re:WebAssembly by nyolfen on Saturday February 27, 2021 @07:14PM (#26289442)
i am not looking forward to having ads delivered by binary blobs. say farewell to the age of client-side scripting.
Re:WebAssembly by AgentME on Saturday February 27, 2021 @07:14PM (#26289449)
How is this any different than getting ads from minified blobs of javascript?
Re:WebAssembly by rasz on Sunday February 28, 2021 @05:12AM (#26292198)
doesnt matter if its minified as long as you can

    window.console.clear = function arsehole() {console.log(arsehole.caller, "Asshole script called console.clear()")}
before it executes

Stuff state of the art adblockers (uBO) inject to block ads today: https://raw.githubusercontent.com/uBlock-user/uBO-Scriptlets...

Re:WebAssembly by pjmlp on Sunday February 28, 2021 @01:07AM (#26291062)
You cannot disable wasm.
Re:WebAssembly by AgentME on Sunday February 28, 2021 @01:52AM (#26291223)
This isn't true. If you block javascript from running, then that will include blocking WebAssembly. WebAssembly is only started through javascript, and if things ever changes so that webpages can include WebAssembly directly, presumably it will also be controlled by the same browser settings that control whether javascript is executed.
Re:WebAssembly by pjmlp on Sunday February 28, 2021 @02:50AM (#26291515)
Yeah, but then you block everything and not only wasm.
Re:WebAssembly by AgentME on Monday March 01, 2021 @07:09AM (#26301971)
Why would you want to block wasm specifically? There's nothing it can do that javascript can't.
Re:WebAssembly by rasz on Sunday February 28, 2021 @04:54AM (#26292100)

    WebAssembly
    WebAssembly {compile: ƒ, validate: ƒ, instantiate: ƒ, compileStreaming: ƒ, instantiateStreaming: ƒ, …}
    delete WebAssembly
    Uncaught ReferenceError: WebAssembly is not defined
Re:WebAssembly by pjmlp on Sunday February 28, 2021 @05:19AM (#26292233)
Great, now do that in a check box like JavaScript settings on browsers, without extensions.
Re:WebAssembly by rasz on Sunday February 28, 2021 @09:51AM (#26293749)
I have this running as a uBO scriptlet injected into every website before content javascript starts to execute

    *##+js(myscript)
does various things, disables webassembly, websocket, AudioContext, serviceworkers, openDatabase and indexedDB, navigator.sendBeacon and window.opener, some fingerprinting randomization stuff, etc. I wish there was a Browser on the market actually letting you configure such things _per domain_ as Opera Presto used to, alas we are on our own now :(.
Re:WebAssembly by nyolfen on Saturday February 27, 2021 @07:17PM (#26289465)
i can usually block those scripts and still have a functioning page
Re:WebAssembly by CraftThatBlock on Saturday February 27, 2021 @07:33PM (#26289557)
You can still block those blobs, as they too are loaded by URL.
Re:WebAssembly by nyolfen on Saturday February 27, 2021 @07:53PM (#26289672)
what i am envisioning here is the content of a webpage compiled with ads therein. it would be desirable by the googles of the world for this very reason.
Re:WebAssembly by catlifeonmars on Saturday February 27, 2021 @08:02PM (#26289710)
This is still possible using JavaScript, and yet it is not widely seen.

You can think of WebAssembly as another mechanism for executing code in the browser in the context of a web page. JavaScript is still required to (1) load the wasm binary, (2) evaluate it and (3) connect it to DOM APIs or really anything outside of the isolated wasm execution context.

Re:WebAssembly by rasz on Sunday February 28, 2021 @04:56AM (#26292113)
How you block some forms of tracking/ads is you inject your own STUB javascript functionality before the offending script loads.

https://github.com/uBlock-user/uBO-Scriptlets

This wont work with webassembly.

Re:WebAssembly by Alexendoo on Sunday February 28, 2021 @09:59AM (#26293812)
None of these scriptlets would break if a site uses WASM, they're utilities for things like adding/removing/mutating elements from the DOM, modifying localStorage, stopping alert()

executesitefunction.js could arguably be effected, but that relies on a site installing a particular function on window, which isn't required when using JS, and could be still done where the function is backed by WASM

Re:WebAssembly by rasz on Sunday February 28, 2021 @10:40AM (#26294113)
Hmm this repo doesnt have the currently used scriptlets.js file, weird. I think this is the official one https://git.furworks.de/opensourcemirror/ublock-origin/src/b...

A lot of stubs, a lot of functionality to kill a script when tripping certain trigger action, or force some properties.

Re:WebAssembly by avbor on Saturday February 27, 2021 @08:04PM (#26289721)
Don't worry, won't be likely to happen - the ads that are displayed now as banners are literally bid on when it's loading, so at most the ad serving code would be bundled, but you would still be able to block the binaries they load.
Re:WebAssembly by kroltan on Saturday February 27, 2021 @07:57PM (#26289687)
This can happen as it stands with JS too, though.
Re:WebAssembly by qbasic_forever on Saturday February 27, 2021 @09:14PM (#26290065)
Advertisers would hate that kind of model. They want perfectly targeted and customized ads for each individual viewer. Baking the ads into the content or page itself would be going back about 20 years in their world.
Re:WebAssembly by Kuinox on Saturday February 27, 2021 @09:53PM (#26290233)
They can bake the ad servers side in the binaries.
Re:WebAssembly by pshc on Saturday February 27, 2021 @11:15PM (#26290624)
They could do bake ads in JS too, but websites aren’t really incentivized to do so as it would increase latency and complexity.
Re:WebAssembly by afiori on Sunday February 28, 2021 @04:18AM (#26291904)
And also advertizers rightly do not trust the content provider not to lie about how many times they showed the ad.
Re:WebAssembly by afiori on Saturday February 27, 2021 @07:34PM (#26289562)
wasm has no effect on that...
Re:WebAssembly by Waterluvian on Saturday February 27, 2021 @07:39PM (#26289603)
I don't think I've ever blocked an ad by way of javascript. My blocking is all done by pattern matching a blacklist of origins.
Re:WebAssembly by rasz on Sunday February 28, 2021 @04:58AM (#26292125)
Thas means there are websites you cant load at all because ad code was bundled in the main html.
Re:WebAssembly by Waterluvian on Sunday February 28, 2021 @07:18AM (#26292862)
Interesting. Anyone have any examples?