I know the title is a bit off, but what I'm asking is if it is possible to have a python script on my website that can detect if my Android phone is connected to the computer Im using to view the page. I don't know if this is possible since I think python is server-side, but maybe this is possible to do with JavaScript? I'm fairly new to programming so I may not be as smart as you guys out there but if someone could just lead me in the right direction I would be grateful.
What you're looking for is not TOTALLY ABSOLUTELY impossible, but you may need some help from the computer you connect the device to, from the browser you're visiting your site with or from the device itself. Some possible options:
have a program running on your computer which checks if the device is connected and pinging a certain URL on your website if it is.
write a browser plugin which checks if the device is connected and exposing the information via some JS API - the JS code on your site will be able to use it.
have a program running on your device which pings your site each time the device is connected to a computer.
Admittedly, all the solutions are from the "tricky" category :)
What you're looking for isn't possible and should not be possible for security concerns. Do you want someone knowing what devices you have connected to your computer? You're essentially wanting a device sniffer but a website would not be capable of accessing the client's machine in this manner to access the desired information.
Related
I'm developing a website, in which I need to ensure that some pages won't be opened in more than one tab / browser. I need some sort of client identification. As I know MAC address cannot be queried using javascript.
I know that Netflix does something just like this, when opening two tabs of video watching, Netflix prompt an error that I'm already watching. Even if I'm using a different browser, Netflix can still tell I have another browser which is watching a video, which means they don't use cookies for this.
So in short, how can a web app distinguish between computers? How Netflix does that?
I do not want to allow Web Debuggers such as Charles Proxy, Fiddler, Wireshark, etc while using my Node JS application. I'm not fully sure what's the best way to do this. Is there a way to detect when a new program is launched in node, and then check if it's a web debugger?
I just don't want people intercepting requests sent from the node app.
I have tried getting all running processes on user's computer, and if any are a web debuggers, close my app, but this requires checking the running processes every couple seconds.
There is no effective way for you to do this. There are more debugging tools than you could imagine to check for, and there are ways that they could be hidden beyond your ability to detect (like running them on another computer, or running your application inside a virtual machine). Besides, your application is written in an interpreted language -- any user savvy enough to use a debugging tool could just as easily open up your application and remove the code that was supposed to disable their tools.
You haven't gone into much detail about why you're trying to do this, but the fact that you're asking is a sign that your application may be structured incorrectly. If your application is communicating with a server, any access controls (e.g. on what information the client has access to, or on what operations it can perform) should be implemented on the server -- the fact that the client can "see" what is going to and from the server should not compromise the security of your system.
That is impossible! Browser is a software, just like Charles Proxy, Fiddler, Wireshark, etc ...
I want to be able to create an offline program that can use the browser as GUI. I'm not particularly good at GUI programming in general, and overall it seems that using HTML and CSS to structure a GUI would be the easiest.
Cross browser method is preferred, but I will most likely use Google Chrome
I need to be able to open an external program, possibly with command line arguments
Javascript seems like the best language for this, however as far as I know it isn't possible to launch programs with it.
This is on Windows 7.
That's a good idea and is done by a several popular softwares.
The best way is to make your offline program run a web server that the browser will be able to access.
ie: Your program starts a web server on localhost:5555 and then you'll be able to request http://localhost:5555/users in Javascript, from your browser.
Another approach could be using a UI framework like AngularJS + local storage. I'm working on an app right now that will be used online (connected to the web), online locally (connected to a local server that is not connected to the web), and offline.
You could build a single-page web app and let Angular manage all the "urls".
I am wanting to develop an application for mobile devices, which shows in real time where a user (with this software installed on your mobile device) is. The idea would be that one (or more) users could follow the map the displacement of another user via GPS. I want to use PhoneGap with HTML5 and CSS and Javascript.
My question is: Is it possible to do that with these technologies? If yes, where can I get information of how to handle the GPS that way? If you can not, which language would give me this possibility and where can I get information? At first, I intend to develop this Application for Android and IOS.
Yes it’s very much possible with PhoneGap technology. You have to write a web service to keep the GPS coordinates as user updates (or auto updates) in server. You can let other users to connect to Web service and get the info they wanted (i.e. the data they wanted to see the current location of the user). You developed using PhoneGap means, it’ll work for iPhone too.
You can easily develop a web service either using PHP, Java or C# though C# web services are easy to write and maintain but PHP web servers are cheap compare to windows hosting (which you will need to host C# web service).
The question you asked is very broad so can write a 1000 words article and beyond. If you ask specific question I can answer that.
Synopsis: I am developing a HTML5 web app that will allow tablets(iPad or Droid) to login to a server and perform various functions. The client would like a way to check the devices mac address when logging in. From what I have read, most solutions use activex objects that will not work for webkit browsers.
Question: Does anyone know a solution that would hook into a HTML5 web app seamlessly(Idealy update a hidden form element with the value upon logging in)?
Thanks!
I don't think there's going to be a straightforward way to do this. The web server won't be exposed to a client's MAC address unless they're on the same physical segment...you'll only see the MAC from the most recent router hop in general.
If anything exists, it's going to be a browser plugin (show-stopper on iOS). And it would probably need more than the default permissions available (I don't suspect you can enumerate network interfaces in Java, for example, without asking for elevated permissions).
If you're looking for HTML/JS only then I don't think that this is possible. It won't be exposed.
The problem is that the packets you recieve back will only contain the MAC address of the node on the last hop.
This may be possible via a plugin, but then this limits you on iOS, and possibly also Android as you'd need to provide them a way of getting the plugin first (unless you used a plugin that was installed by default).
Edit: Not that I support an app for every little thing, but it shows that easy to press app buttons sometimes tend to do better than web apps (regardless of being able to make browser shortcuts to home screens). If it is suitable, you could consider loading this within a web view on the target device from within an app, from which you can then of course access MAC addresses and whatever else you may need.
MobiThinking: Mobile applications: native v Web apps – what are the pros and cons?
Forbes: Mobile Web App vs. Native App? It's Complicated