« first day (4353 days earlier)      last day (820 days later) » 

01:43
Hi guys, can anyone check my answer here? Previously a lot of my answers were deleted due to not sufficient atribution. Did I do it right this time?
02:14
It seems that the majority of your answer is code copied and pasted from elsewhere, regardless of whether it's attributed properly. The OP mentioned in the question that Interception had already been tried and failed, so I'm not sure why you included code from an Interception wrapper. The Selenium code isn't even close to relevant - Selenium is for automating web browsers for website testing, automation, and scraping, not creating mouse movements for games.
@MattDMo Thanks! So basically it's not a good answer
If you're going to answer a question, it has to be an original contribution. It's okay to use some attributed code from elsewhere, preferably modified somewhat to fit the situation, but just copying someone else's work without adding anything original of your own isn't doing anyone any good. Use others' work as a starting point for your own customized solution. I use documentation to figure out how to do something (and link to it, for reference), but answer the question in my own words.
@DialFrost It's not the greatest I've ever seen, no...
Ok, I'll try to refine it! Thanks
Sure. Looking for constructive criticism is definitely a positive trait.
To be fair, the question isn't great, either - it's basically a recommendation request, which is explicitly off-topic. I'm surprised it hasn't been closed.
I see :P
02:28
Ah - can't vote to close because it has an open bounty. Rats!
Heh, you can flag right? :P
@MattDMo I see your quite proficient in python? :P
I have a lot of fake internet points, so if you count that as a measure of proficiency, sure.
02:51
Oh hehe, maybe you can help with this? It's been bugging me for awhile now so I decided to ask codereview
 
2 hours later…
04:45
@JonClements F&F have done another Mamas & Papas cover I Call Your Name. Previously, Dedicated to the One I Love, & from their very first gig, Monday, Monday.
Oops, almost forgot California Dreaming
05:09
You don't need to have a Southern accent to sing John Prine's Angel From Montgomery, but it doesn't hurt.
06:00
Golden Highway tearing it up around a single mic: Back up & Push
 
2 hours later…
07:54
is there any tool which can generate a dependency graph of all packages combined which need to be installed , from requirement.txt file ?
Surprisingly enough, none of the tools I can find seem to accept more than one dependency as input
 
1 hour later…
09:14
@Aran-Fey i mean lets say i am using package A and B, where a require package d >v2.3 and B require v>2.4 so with this info, i require package d>=2.4 for better compatibilty. so looking for a tool which can make such information from requirement.txt file itself (for legacy project i am facing issue now as it is trying to install all package and seeing which is better), so that i can download them all in one single go
 
1 hour later…
10:26
pip install --dry-run --ignore-installed --report - kind of works, I guess
 
2 hours later…
12:18
Could I get some feedback on this (javascript) question? I'm not sure if I made it clear what my goal is
@Aran-Fey related: stackoverflow.com/a/23202652/12349101 and also, there seems to be a bug on firefox that could be the culprit: bugzilla.mozilla.org/show_bug.cgi?id=937718
I'm guessing this might also be related to the fixing of unequalized sounds that was talked about last time? ;)
Yeah
12:34
from my own javascript knowledge, that also seems to be unequalized...the problem beside the bug that doesn't return an error is also the limitation caused by CORS and CSP. Maybe try to make a simple MRE using a local audio file on a simple HTML and see if it work on localhost first
once it work there, then fixing the CORS/CSP limitation or working around it should be easier
I don't see a solution to my problem in there, but at least I now know who I have to curse for this stupid design decision. Dishonor on Robert O'Callahan, dishonor on his family, and dishonor on his cow
additionally, you could check out the javascript room chat :P I went there myself once when I was doing my weird and unfinished python/js project
to fix it, there are dozens of way, I guess you could use a server that fetch the file on a buffer or locally and do whatever you have to do on it (websocket anyone?). Since you plan on making an extension, I guess you could also use the probably existing flags to "disable" the CORS/CSP limitation. However, that's usually unadvised, but if you're the only one using that extension...
if it's an extension you could just inject the js code into the page could you not? Or is this extension fetching media from multiple domains?
I am injecting JS code into the page, but since the audio is being loaded from a different domain, the browser refuses to let JS access the audio stream
You can sort of hijack console.warn and if you get the message you're interested in, throw an exception or do something else instead, like:

    og = console.log
    console.log = (message) => {
        if (message == 'hi') alert(message);
        og(message)
    }
12:49
@NordineLotfi I think it would be possible to load and play the audio file with JS, but there are multiple problems with that. One, The <audio> element on the webpage would become useless - the user wouldn't be able to change the volume, for example. And two, if it's actually a video, then I'd end up downloading the whole video twice.
@Aran-Fey what I was suggesting was to inject the code into a page from the same domain that the audio is from
Hmm, there is no such page though? It's not like the audio is inside an iframe or anything
@duhaime I remember doing the same thing when I wanted to know when a function finished or not. There a couple of tiny problems with this though, like the fact that it overwrite certain unknown function that also use console.log or the fact that you can easily end up in a recursive loop depending on what is being executed.
it's too bad there isn't any way to get access to the "queue" or stack of what's going to be executed in browsers, otherwise would make certain things easier
well how about injecting it into a page from a domain that has the right CSP set? I mean it plays on wiki pages, right? So their CSP allows that domain/subdomain
@Aran-Fey hmm, true. Maybe you could make one of those websocket but with chunk support? might be more complicated though, but I think there some implementation of that for audio somewhere. There also still the flags for disabling CORS/CSP limit if you really want to do it (only work inside an extension)
12:57
@duhaime Doesn't seem to work :( I tried warn, log, and debug, but none of them are called
@PeterT I don't see how this would work. Say there is only one single browser tab, which is on the domain stackoverflow.com. This tab plays an audio file from wikimedia.org. Where/how am I supposed to inject my JS?
another thing you could do is find a firefox extension that does something to an audio file/stream on a per tab basis, then inspire yourself from how it works.
put in an iframe with a wikimedia page (or anything else with the right host response), where you inject your JS
Oh, that's an interesting idea. That sounds like it should work, but then again, can it really be so simple to bypass this security measure? Guess we'll find out...
I thought you said in your question that when you get a XSS asset something gets console warned?
Yeah, but the browser generates that warning. It doesn't seem to go through console.warn
13:09
hmm, can you determine that the asset loaded successfully when it does?
@Aran-Fey that's related to the bug report I posted earlier :P
You mean the audio file? That actually starts loading before my JS is even executed
@Aran-Fey probably not, if the security policy doesn't allow iframes either then it won't work for those domains
13:33
The iframe thing is actually a lot trickier than I thought... it's not like I can just create an iframe with arbitrary HTML inside; I need to actually find a valid URL on that domain and then completely rewrite the HTML
why not load the asset from a server you control then fetch the asset from your server?
I don't have my own server or assets; this is a browser addon that's supposed to work on every website
I know very little of CORS, so maybe I'm restating the obvious: if I put crossorigin="anonymous" on the audio element, I can still hear the audio after clicking the button. jsfiddle.net/gboavx6n/1
There's a good chance one of you will now say, "yes, that works specifically when you're on jsfiddle.net because jsfiddle's server sets the 'allow cross origin tomfoolery: true' flag in all of its response headers. But most servers set that to false."
Close. It only works if it's already present in the HTML. Retroactively adding it with JS has no effect, so I'm at the mercy of the website
Hmm. I wonder what happens if you create a completely new <audio> element with JS
Simply MITM the raw HTML and run html.replace("<audio", "<audio crossorigin='anonymous')
The Internet tells me that WebExtensions do not have supreme cosmic power over the HTML that the browser engine receives. Disappointing.
13:57
Alright, so as far as I can tell, crossorigin="anonymous" works as long as it's set before the browser starts loading the file. But, since it tells the browser not to send any credentials/cookies/whatevers along with the request, there's a chance that the server responds with "Who the heck are you?! I'm not sending you my audio file"
I wonder if your extension could set up a background task to listen for resource requests that might fail for CORS-y reasons, using developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/….
I see the words "modify response headers" on that page. My MITM sense is tingling
I think I can just clone the <audio> element, set the crossorigin attribute, and then swap the old element with the new one
There'll be problems if the page's JS code has a reference to the original element, but there isn't much I can do about that anyway
Let's revisit that for public release v1.2
14:23
Hi, I'm trying to understand why I need print("\r\n") at the beginning of my python script to print in my Mac Terminal. I didn't need this when running on Windows. Could someone help explain this to me or recommend a resource? I can't seem to find an explanation on Google for why it's needed for my mac terminal.
It's just about flushing the terminal buffer. Implementations just vary and newlines typically flush
there's probably some windows terminals that exibit the same behavior
Ahh gotcha. Thank you!
you can make sure to flush by doing print("message", flush=True)
At the beginning of the script? Implying that something else left unflushed data? :/
Coming from Java, all these flushing techniques caught me off guard lol
14:36
how's that different? I saw the same in Java
people just usually call "println" in java which flushes, but if you use "System.out.print" I've seen same issue in Java
I'm caught off guard whenever Python and Java have anything in common
@krikara Do you also need this in a new terminal session? This isn't usually required.
 
3 hours later…
17:54
@PeterT I dont think I've ever seen anyone use plain "println". It's always System.out.println or some sort of logging library and I've never had logging issues deploying locally across diff OSes. With Python, my single py script has different results across different terminals. Sometimes I need to flush in the script, sometimes I need to use -u program.py, etc.

« first day (4353 days earlier)      last day (820 days later) »