|IRC Nick||Time (GMT-7)||Message|
|wamp3ter||00:05||I have a bit of a problem, basically on plugin load I need to check for and download a file if it is absent or if it is too old. I have got something working via onPluginReady, however it just occured to me that every page that has the plugin will run the downloader which means my file could get clobbered
I could put flocks there but was wondering if there is a better way
I could perhaps put it in static initialize but then I would have to get the proxies from SystemProxyDetector and use cURL. is that better?
|taxilian||00:05||you could also have the first one set a global flag and the others check it to see that it's already being downloaded|
|wamp3ter||00:05||I fire an event when its ready to be used, so if I add the flag, is there any way for the other instances to wait for the flag to be unset and then fire their event?|
|taxilian||00:05||well, this could get tricky, but you could add weak_ptr references to a vector and call a method on all of them when it finishes
just make sure it's a weak_ptr not a shared_ptr so you don't keep plugins alive after their time
all plugin instances are in the same memory space
granted, you could still have an issue if the plugin is opened in multiple browsers at once
|wamp3ter||00:05||hmm... I think instead of the flag the flock with the weak_ptr could solve the multi-browser problem too
let me try the flag option, the lock can always be added on
|taxilian||00:05||different browsers will be in different processes
so weak_ptrs won't fix a multi-browser problem, but will a multi-tab/window problem
|wamp3ter||00:05||ah yes, sorry I was only thinking about the flock not about the callback. this might sound silly but is there any way to auto-reload the plugin (so to speak) after a timeout?|
not from the plugin, though
|wamp3ter||00:05||so it looks like it might be better to simply provide a jsapi endpoint and let a script take care of download|
|taxilian||00:05||just be careful of security|
|wamp3ter||00:05||I have been restricting base urls (for downloads), plus https also been restircting where it can download files (plus no relative parts in the url) so far
I will have to look into how the js could be subverted though, have not yet thought too much about it, will probably come back to bug you some more about it once I have thought it through
|krishna__||09:05||taxilian, can you tell me what software you used for creating tutorial videos for firebreath?|
a user donated me a license
taxilian, i am working on this plugin, wait let me show you
taxilian, here it is: https://nutty.io it would be nice to have your feedback
i have uploaded there mac plugin right now
|taxilian||09:05||give me a few; I'm in the middle of something right now|
|taxilian||09:05||krishna— this is kinda cool|
|krishna--||09:05||taxilian: thank you :)|
|taxilian||09:05||it didn't set up my terminal nromally, though|
can you explain more?
|taxilian||09:05||my environment, I mean
the regular setup scripts like /etc/profile hadn't been run
|krishna--||09:05||it works on chrome only right now|
|taxilian||09:05||right, I saw that
why is that?
|krishna--||09:05||the terminal emulator - i took it from another project ... it works fine only on chrome. i have to fix it to make it work on other browsers|
so what does the plugin do?
|krishna--||09:05||it opens a pty ... thats it "man forkpty"|
|taxilian||09:05||might have to do something to make it fully init the environment
probably something small
|krishna--||09:05||yeah ... will check|
|taxilian||09:05||like the difference between su root and su - root|
works fine on linux though
will check for mac
|reichi||09:05||the download for linux is missing, right?|
|krishna--||09:05||reichi: yeah i need to upload the plugin there
give me an hour
i think i'll give it shot tomorrow :)
|krishna--||09:05||will be glad to get feedback on it :)|
|taxilian||09:05||my first concern looking at it is security; how does it communicate the screen between clients?|
|krishna--||09:05||taxilian: right now the plugin is accessible by all websites, need to make it accessible only by nutty.io, what would hte best way be to do it?
taxilian: using websockets (secured)
|taxilian||09:05||hmm. there is no 100% foolproof way to do it, but I'd use the m_host->getDOMWindow()->getLocation() call to get the current page URL
and verify that the domain is what you expect
that'll at least ensure that it can't be used without compromizing the DNS
even if dns is compromised, https protects it right?
|taxilian||09:05||only if the user actually pays attention to the warning and doesn't just ignore it =]
but that's another thing you can do is verify that it's in https mode
|taxilian||09:05||you could also pop up a dialog to allow the page to use it or something
in that case you'd probably want to use JSAPIProxy to avoid giving the JSAPI object to the browser until you've verified
|krishna--||09:05||i redirect http to https automatically|
|taxilian||09:05||right, but in case of dns spoof you wouldn't|
|taxilian||09:05||so the plugin should verify that|
i will be back soon
|[Outcast]||10:05||so success I can now make sip calls in my browser using pjsip and FireBreath.
don't suppose that will be open source?
I've wanted to integrate a sip client with a plugin for a long time
|[Outcast]||10:05||Not at the moment.|
|[Outcast]||10:05||I am working a network testing tool for work.|
|[Outcast]||10:05||but I might be convinced to start my own open source side project
We could call it FireChat.
|taxilian||10:05||a sip client by itself would be awesome as a sample project
I'd probably help with that one, a little anyway
I'm so strapped for time these days...
|[Outcast]||10:05||yea, I guess that.
I am still trying to get grasp of everything that is under firebreath.
There is a different in using an API from understand a API.
|taxilian||10:05||I have done a few videos on the internals
but you're right, there is a lot
|[Outcast]||10:05||but all I have to say is thank you for doing it. It has by product development a lot easier.
and I will try to contribute back when possible.
|taxilian||10:05||I'm glad it's helpful. If you are able, please contribute back however you can; sample projects, documentation, blog posts, tutorials, money, supporting other users… everything helps
|reichi||10:05||i think firebreath is pretty well understandable
i mean the "internals"
|taxilian||10:05||why thanks =] of course, you've dug around more than most|
|reichi||10:05||I've added a "new" platform which took only a rough day|
|taxilian||10:05||how hard has that been to keep up to date with the latest trunk?|
|reichi||10:05||i have original fb repo wiht my changes
merging is mostly painless
usually goes without any further ado
but i havent upgraded for months now
since i had no reason to do so :)
|krishna--||11:05||taxilian: what would the license of the files generated by fbgen.py be?|
|taxilian||12:05||krishna-- technically new bsd, I suspect
but they weren't really intended to be licensed any particular way; they are your files
|krishna--||12:05||taxilian: ok then ... will put it under MIT (similar to new bsd)|
|[Outcast]||12:05||Trying to working on a call back for one my classes and getting this error: C2440: '=' : cannot convert from 'void (__thiscall myAPI::* )(void)' to 'void (__cdecl *)(void)'
Can someone tell me what I am doing wrong?
Hang on I might be doing this in wrong order.
|taxilian||12:05||you have a problem with your arguments
I'd need to see the line to know more
|[Outcast]||12:05||let try something first. I might be bass awkward!!|
|krishna--||12:05||taxilian: I have put the plugin under MIT here: https://github.com/krishnasrinivas/nuttyio-plugin let me know if i am doing anything wrong license wise or otherwise :)
reichi: i have uploaded linux plugin 64bit ... checkout https://nutty.io
taxilian: another question, lets say i had generated framework files using fbgen.py using FB1.6, can i use prepmake.sh from FB1.7 or later?
|[Outcast]||13:05||taxilian: take a look at the example I set up at https://gist.github.com/outcast/5578497
when I try to set the call back I get a error similar to above.
|taxilian||13:05||krishna-- there are no breaking changes in 1.7 that I know of|
|[Outcast]||13:05||taxilian: ok fixed typeos
but the is now giving the same error as before.
why are you using function pointers?
|[Outcast]||13:05||I was trying to do a call back method.|
|taxilian||13:05||don't do that
use a functor if you're going to do such a thing
|taxilian||13:05||wasn't it you I was talking about using weak_ptr though?|
|[Outcast]||13:05||at least I don't rememver
|taxilian||13:05||so what problem are you trying to solve with a callback?|
|krishna--||13:05||taxilian: ok cool, thanks|
|taxilian||13:05||and why aren't you just firing an event on your jsapi object?|
|[Outcast]||13:05||the API class creates an instance of that class. so I was hoping I could a point to the a local wrapper function to fire the event from inside my custom class.|
|taxilian||13:05||and why not just pass a weak_ptr of the jsapi object into your custom class and use that?
a callback the way you're proposing is very dangerous
there are so many ways you could shoot yourself in the foot it's kinda scary
|[Outcast]||14:05||is all of boost available in fire breath?
never mind looks like it.