webRTC example does not working after downloading source? - webrtc

I am looking to use webRTC for my college project. The example(http://simpl.info/getusermedia/) works nice (asks the permission to access the webcamera) whenever i access them from internet but after i download the source(even from github) it does not work, it does not even ask the permission for accessing the camera. any help? Thanks.

The WebRTC API does not work unless it is being hosted. Simply opening the html files and running the scripts will not work.
So, I bet if you host it(Apache, VisualStudio, etc), it will work just fine.

Related

How to address Firebase from an Arduino?

Background: I've a sensor hooked up to an arduino printing readings through the serial monitor. I want to log these in firebase.
I've done a bit of digging on this, and my research has shown me that an arduino simply can't handle the SSL needed to talk to firebase properly.
Any suggestions for workarounds? Checking SO and google's only turned up "it can't be done", but I figured I'd ask anyway. Any lateral thinking is appreciated, thanks!
If you figure out a way, let us (support#firebase.com) know. That would be an awesome hack!
Some thoughts:
You might want to look into the Spark Core (available for pre-order). They mention SSL support, though it's unclear to me what that means exactly.
You could proxy the requests through a server that can speak SSL. For instance, you could run a tiny node.js service on an Amazon EC2 box that just proxies REST requests to Firebase (e.g. using http-proxy).
If you're hardcore, you could try to get the Arduino talking to an external ethernet controller that has built-in SSL support (e.g. this one), but that's probably a big project. :-)
Longer-term, we might expose a non-SSL endpoint for Firebase requests that's specifically for this sort of low-end hardware use-case. Ping us at support#firebase.com if you want to start a dialog.
Here's a php script I whipped together to solve for Arduino no https.
It's basically a form that GETs to the php script and then sends it off to your Firebase database.
http->php->Firebase
https://github.com/robertcedwards/httpFirebase
*Make sure you add Heroku or your server to the whitelist of IPs that can post to Firebase
I know its an old question but visitors from google keep coming.
Have a look at this post: http://www.devacron.com/arduino-firebase/
[EDITED]
These arduino libraries might help:
firebase-arduino
https://github.com/googlesamples/firebase-arduino
https://github.com/ed7coyne/firebase-arduino
To install it:
Download the zip file, go to Sketch>Manage Libraries>add .zip file
Now you have access to
#include <FirebaseArduino.h>
and can begin using it with
Firebase.begin("example.firebaseio.com", "token_or_secret");
Follow the example at https://github.com/ed7coyne/firebase-arduino/blob/master/examples/FirebaseDemo_ESP8266/FirebaseDemo_ESP8266.ino

How do I go about safely taking a screenshot of a website that I know is infected with malware?

Background:
One of my clients' websites has become a malware infested hotbed.
Disposing of the malware has proven difficult and time consuming, and, in the meantime, we still have had to do work on the site.
For now, we went to some trouble to do our work - creating a disposable VM to just run a web browser, so we can see what the site looks like for the designers' work, for example.
I'm wondering if there's an easier (and faster) way to get an idea what the design of the site looks like. Not everyone on the project is tech savvy enough to be trusted with, for example, properly handling switching VMs.
Question:
Is there a method for safely seeing what a malware infested website looks like (for example, a service which will browse the site for me and send a screenshot), one which ideally is easy and simple enough to use that I can trust our non-tech-savvy designers to user?
You might take at look at Internet Archive: Wayback Machine to see if the site has been archived.
If a screenshot is all you need, there are several online browser simulators, such as Net Renderer (which will run any inputted web URL in a given version of Internet Explorer and then supply a screenshot). You might also try BrowserStack, which requires an account, and is not free, but does have a free trial period, and offers more than Internet Exploder.
You could also try running a browser in Sandboxie, which is simpler to set up and use than a VM (you just install it, and then use the windows right-click menu to launch any program in a sandbox of your choosing). However, it isn't free for commercial use.
I don't know if exist a standalone tool to parse a website for malwares, but I think this can help you, it's a google tool that you can you with a request and they will send you a response.
Follow the link:
http://support.google.com/webmasters/bin/answer.py?hl=en&answer=168328
Hope it helped.

Restart/shutdown mac remotely from iOS through SSH?

I set up my old laptop as a media server and created a mac application in AppleScript that would remotely restart or shutdown the mac depending on which button was pressed, using this code:
tell application "Finder" of machine "eppc://USERNAME:PASSWORD#MYSERVER"
shut down
end tell
It's super simple, and was easy to write, but now I want to create an iPad app that can accompany the mac one. Ideally, I'd like to use AppleScript as, like I said, it's very simple, but I feel like that's not an option.
What are some other ways to do this? Where I would click a button, then it would connect to my mac and either shutdown or restart.
I feel like the best way would be to use SSH, and right now I'm looking at https://github.com/x2on/libssh2-for-iOS. Any other ideas?
Okay, just to brainstorm.... Dropbox is a great way to share content among machines, but it's also a pretty darn decent communication mechanism.
I use Dropbox to fire up (legal only!) bittorrent downloads on my home machine by setting up my torrent client to watch a dropbox folder for incoming .torrent files. I can then save .torrents into that directory on any machine I have Dropbox on, or in principle from a browser on my iOS devices that could share to Dropbox, and ta-da, instant remote kickoff. I can sit on another machine, save a .torrent to that directory, watch its file extension change to .torrent.imported, and know that when I get back to my main machine, that thing will be downloaded.
You could use folder actions or a cron job to watch a certain Dropbox folder for commands, and then put files into that folder that trigger those scripts to perform certain behaviors. Dropbox has a very nice iOS client library, making it totally possible to store stuff to Dropbox from a custom app.

Is there a decent, standalone, cross-platform webserver that will work in concert with Autorun on USB Jump Drives?

I'm trying to find a decent standalone webserver that I can load up on a jump drive.
My wife is a photographer, and I'd like to present the clients with their images on usb. When they plug it in, I'd like a web page to load up, and run some jQuery magic to show them a nice carousel of all there images.
So far, this is all fine since it can all be done client side and doesn't need a server at all.
The problem I'm facing is that I'd like some server-side code to be able to read the images out of the directory so that once the interface is built, I don't need to manually create all of the <img /> tags.
If it was primarily going to be used in a Windows environment, I'd have no problem going with IIS Express, since I'm mainly a .NET MVC developer and this would be perfect for me... However, the fact of the matter is that a large amount of our client base is also OS X users.
I did find this Java one jlHttp, and I also found this thread here on SO, but I don't think I understand enough about either one of them to accomplish what I'm looking for.
Thanks in advance for your suggestions.
I'm looking for the same thing, and the two best options I've found were Flying Ant cd web server and Stunnix. Of the two, Flying Ant is cheaper, and I've tested it with success on my project.
I found Mongoose very convenient for this exact purpose. It's crossplatform, lightweight and requires minimum configuration. You may be interested in this project that uses Mongoose to display pictures in a folder tree or FTP directory.
How about Node.js
It says it runs on Linux, OS X, and Windows.

How to get started writing desktop application for OS X that manages a directory in the background?

I want to create a desktop application for OS X that does 3 things:
Creates a directory on the users computer with a custom icon
Downloads files to that directory from my server
Monitors changes in that directory and subdirecties so that it may send commands to my server
I understand how to download a file into a directory and communicate with my server. Where I lack knowledge is really the steps to get started so that the app is essentially this "smart sync folder."
Can anyone recommend tutorials, sample code, or just some general direction of how to get started on an app like this? Think really stripped down version of DropBox
Well, since you already know how to handle the web stuff, next step would be to get notifications when your folder changes.
Here's a good discussion of some good approaches (somewhat dated)
or
Download this demo to get started