如何从浏览器识别设备并获取唯一的ID [英] how to recognizing the device from browser and retrieve unique id

查看:10824
本文介绍了如何从浏览器识别设备并获取唯一的ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能做使用Android设备以下。

I want to know if it's possible to do the following using an android device.

用户为他的机器人设备浏览使用原生浏览器的一个网站上。当用户点击特定链接或图像上;是有可能得到从电话的唯一ID?或者写一个文件到手机的SD卡?或更高识别装置的任何装置。

The user is on his android device browsing a site using the native browser. When the user clicks on an particular link or image; is it possible to get a unique ID from the phone? or write a file to the sd card on the phone? or any means of identifying the device later.

后来,当我运行特定应用程序我希望能够访问这是当用户浏览网站存储的信息。

Later when I run a particular application I want to be able to access the information which was stored when the user browsing the website.

我知道cookies是,因为他们让我从另一个应用程序访问这些信息。

I know cookies are out because they allow me to access the information from another application.

帮助?

推荐答案

您只能获得用户代理(指向Android设备上),但手机没有唯一的ID。
并且不会其他应用也可以使用一个文件在SD购物车,或者有相同的手机号?

You can only get user agent (pointing on android device), but no unique ID of the phone. And wouldn't other apps also have access to a file on the sd cart, or have the same phone id?

我并不是真的让你的情况,但作为一个黑客,你可以在这整个事情引入加密。
请考虑以下情形:

I'm not really getting your scenario, but as a hack, you can introduce an encryption in this whole thing. Consider the following scenario:

用户点击网页中的链接和一些独特生成的ID存储在饼干(例如my_unique_id12)。您的网页和应用程式,你同时拥有1个共享解密密钥。
当你打开你的应用程序,它需要您的Cookie,你的密钥进行加密(得到一些豆腐渣样shf4r734r7rr374rh%),并将其发送到网站,即解密信息,获取独特的ID(my_unique_id12),并做任何你想让它做。
其他应用程序将有机会获得你的cookie,但没有密钥,他们将无法得到任何信息。

User clicks on the link in your webpage and some unique generated id is stored in the cookies (for example my_unique_id12). Your webpage and you app have both 1 shared decryption key. When you open your app, it takes your cookie, encrypts it with your key (getting some rubbish like shf4r734r7rr374rh%) and sends it to the website, that decrypts the info, gets the unique id (my_unique_id12) and does whatever you want it to do. Other apps will have access to your cookie, but without secret key they won't be able to get any info.

这篇关于如何从浏览器识别设备并获取唯一的ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆